Saturday, June 6, 2015

Comprae Two strings in C#.net

How we compare two strings values in C#.I have implemented many solutions but i want to share best one.
Other solutions are not worked for me.
                string testString1 = textbox1.Text.ToString();
                string testString2 = textbox2.Text.ToString();
if (testString2.IndexOf(testString1, StringComparison.CurrentCultureIgnoreCase) >= 0)
{
// here the to write code..........
}

No comments:

Post a Comment