Best practices for handling and sorting strings with .NET 2.0

Posted: (EET/GMT+2)

 

Microsoft's Dave Fetterman has written a short article to MSDN about handling and sorting strings with .NET 2.0. This best-practice document is worth reading, even if you need to explicitly manipulate strings very little in your applications.

Also, if you have installed the MSDN documentation (Document Explorer), you might find the new topic "Comparing Strings" useful. It is available through this URL.

Finally, it should be noted that .NET 2.0 adds new overloads to many methods of the System.String class. These overloads accept a new StringComparison parameter (System.StringComparison). The values of this enumeration let you specify how you want the comparisons to be made.