Case Insensitive string comparison

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Is this a long way to compare strings ignoring the case?


if ( string.Compare(wsUri.Host, "localHost",
System.StringComparison.OrdinalIgnoreCase) == 0 )
{
// etc.
}

.