Below is the best way to
compare the string in C# and ignore the case sensitive.
string strCompare = "ADIdotnet";
if (strCompare.Equals("adidotnet", StringComparison.InvariantCultureIgnoreCase))
{
/// it is true
}
string strCompare = "ADIdotnet";
if (strCompare.Equals("adidotnet", StringComparison.InvariantCultureIgnoreCase))
{
/// it is true
}
No comments:
Post a Comment