Friday, April 8, 2011

String comparison in C#

Comparing programmatic strings (these are never exposed to the end user)
String.Compare(string1, string2, StringComparison.OrdinalIgnoreCase)

Comparing strings that end user can see:
String.Compare(string1, string2, StringComparison.CurrentCultureIgnoreCase)

No comments:

Post a Comment