Natural Sorting in .NET

"You're programmers. You're almost all college graduates and none of you know what the f**k "Alphabetical" means. You should all be ashamed. If any of you are using your language's default sort algorithm, which is almost guaranteed to be ASCIIbetical (for good reason) to get alphabetical sorting you proceed to the nearest mirror and slap yourself repeatedly before returning to your desks and fixing your unit tests that didn't catch this problem."
OK, so here's how you do it right in C#.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <hr> <sup> <!-- --> <blockquote>
  • Lines and paragraphs break automatically.
  • You can use context links in the text to create context-related links to pages or sites that provide additional information about a word or phrase.
  • Glossary terms will be automatically marked with links to their descriptions
  • Web and e-mail addresses are automatically converted into links.
  • Textual smileys will be replaced with graphical ones.
  • Scripture references will be linked automatically to an online Bible. E.g. John 3:16, Eph 2:8-9 (ESV).
  • You may link to webpages through the weblinks registry
More information about formatting options