if (myString.ToUpper() == theirString.ToUpper) { ... }
Use this:
if( myString.Equals( theirString, StringComparison.OrdinalIgnoreCase ) { ... }
Thanks to: Ralph
Code samples, examples, tutorials, howto's regarding Windows, .Net development and T-SQL
if (myString.ToUpper() == theirString.ToUpper) { ... }
if( myString.Equals( theirString, StringComparison.OrdinalIgnoreCase ) { ... }