how can I extract substring from email id only gmail string in asp.net
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Piyush PansuriyaPosted Aug 10, 2017, 3:58 AM
Hello,
You can use like this :
string str = null;
str = "[email protected]";
if (str.Contains("@gmail.com") == true)
{
MessageBox.Show("The string has gmail");
}
else
{
MessageBox.Show("The String has not gmail");
}