Case Insensitive String Comparison
Here is a little utility method that takes two strings and determines equality while ignoring case. Thus "silverlight"=="SilverLight"=="SILVERLIGHT"==true.
public static class Strings { public static bool IsEqual(string string1, string string2) { return (string.Compare(string1, string2, true) == 0); } }UPDATE (2007-07-05)
Based on feedback I received (thank you) I now favor the following line for case insensitive string comparison:
firstString.Equals(secondString,
StringComparison.InvariantCultureIgnoreCase)