title: .NET equivalent of StrCmpLogicalW
body: <p>What is the managed equivalent of <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb759947%28v=vs.85%29.aspx"><code>StrCmpLogicalW</code></a>?</p>
  
  <hr>
  
  <p>Nieve string sorting rules would sort a list as:</p>
  
  <ul>
  <li>Window 1</li>
  <li>Window 10</li>
  <li>Window 12</li>
  <li>Window 2</li>
  <li>Window 27</li>
  <li>Window 3</li>
  <li>Window 4</li>
  <li>Window 5</li>
  </ul>
  
  <p>Starting with <strong>Windows XP</strong>, Microsoft introduced <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb759947%28v=vs.85%29.aspx"><code>StrCmpLogicalW</code></a> - to sort strings in a way people expect:</p>
  
  <ul>
  <li>Window 1</li>
  <li>Window 2</li>
  <li>Window 3</li>
  <li>Window 4</li>
  <li>Window 5</li>
  <li>Window 10</li>
  <li>Window 12</li>
  <li>Window 27</li>
  </ul>
  
  <blockquote>
    <p><strong>Nitpicker's Corner:</strong> <a href="http://blogs.msdn.com/b/oldnewthing/archive/2004/05/18/134051.aspx#135042">Some people find this sort order confusing.</a> They're not part of this conversation.</p>
  </blockquote>
  
  <p>Starting with <strong>Windows 7</strong>, Microsoft brought the functionality of StrCmpLogicalW into <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd317759%28v=vs.85%29.aspx"><code>CompareString</code></a> with the new <code>SORT_DIGITSASNUMBERS</code> flag:</p>
  
  <blockquote>
    <p><strong>Windows 7:</strong> Treat digits as numbers during sorting, for example, sort "2" before "10".</p>
  </blockquote>
  
  <p>Without resorting to P/Invoke (obviously), what the the .NET framework equivalent of sorting strings naturally?</p>