Tuesday, August 09, 2005 7:44 PM
triplez
New Recommendations for Using Strings in Microsoft .NET 2.0
New Recommendations for Using Strings in Microsoft .NET 2.0
Code owners previously using the InvariantCulture for string comparison, casing, and sorting should strongly consider using a new set of String overloads in Microsoft .NET 2.0. Specifically, data that is designed to be culture-agnostic and linguistically irrelevant should begin specifying overloads using either the StringComparison.Ordinal or StringComparison.OrdinalIgnoreCase members of the new StringComparison enumeration. These enforce a byte-by-byte comparison similar to strcmp that not only avoids bugs from linguistic interpretation of essentially symbolic strings, but provides better performance.
Pretty good article talks about Strings in .NET 2.0, and one of the important improvements are localization and internationalization in strings. Read the article to learn more.
Filed under: Programming