New Recommendations for Using Strings in Microsoft .NET 2.0
There is an article on MSDN, "New Recommendations for Using Strings in Microsoft .NET 2.0
", that explains the motivation behind Ordinal comparison and the new members of the System.StringComparison
enumeration in .NET 2.0. I admittedly glazed over, reading it the first time, but the third example in the section "The Motivation: The Turkish-I Problem" makes a world of sense... comparing InvariantCulture does not do a bit-wise comparison of the strings.
So, if you are comparing System.Uri's, do you compare using InvariantCulture (since the URI should be ASCII), or should you use Ordinal (given the guidance in "Choosing a StringComparison Member for Your Method Call" to use Ordinal for XML and HTTP)? The guidance from the owner of System.Uri indicated to just use Uri.Compare(). The prototype for Uri.Compare looks like:
public static int Compare(