Compare two strings

Madhu.b.rokkam
Posted by Madhu.b.rokkam under C# category on | Points: 40 | Views : 2210
class Program3
{
static void Main(string[] args)
{
string a = "DotNet";
string b = "DOTNET";
bool equalInvariant = string.Compare(a, b, true, CultureInfo.InvariantCulture) == 0;
Console.WriteLine(Convert.ToBoolean(equalInvariant).ToString());

Console.Read();
}
}


Result

True

Comments or Responses

Login to post response