title: SPFileVersionCollection - why versions are sorted in mixed order?
body: <p>SPFileVersionCollection and SPListItemVersionCollection versioning seems inconsistent to me. Inconsistency wouldn't be a problem to me, but sort order is.</p>
  
  <h1>SPListItemVersionCollection</h1>
  
  <p>I can understand versioning of ListItems as they are stored in descending order:</p>
  
  <pre><code>SPContext.Current.ListItem.Versions.Count -&gt; 5
  SPContext.Current.ListItem.Versions[0].VersionId -&gt; 1026 (2.2 latest version)
  SPContext.Current.ListItem.Versions[1].VersionId -&gt; 1025 (2.1)
  SPContext.Current.ListItem.Versions[2].VersionId -&gt; 1024 (2.0)
  ...                                [4].VersionId -&gt;      (oldest version)
  </code></pre>
  
  <h1>SPFileVersionCollection</h1>
  
  <p>However I can't understand how version numbers are saved for a document library item:</p>
  
  <pre><code>SPContext.Current.ListItem.File.Versions.Count -&gt; 4
  SPContext.Current.ListItem.File.Versions[0].ID -&gt; 512 (1.0 oldest one) 
  SPContext.Current.ListItem.File.Versions[1].ID -&gt; 513 (1.1)
  SPContext.Current.ListItem.File.Versions[2].ID -&gt; 1025 (2.1 latest version)
  SPContext.Current.ListItem.File.Versions[3].ID -&gt; 1024 (2.0 (EDIT: IsCurrentVersion = True))
  </code></pre>
  
  <p>They are nor in ascending order, nor descending, but something mixed.</p>
  
  <p><strong>Is there any reason</strong> for SharePoint team to decide to store SPFile versions like that? And do they expect that I write my own method to get latest version or is there a builtin one for that?</p>
  
  <p>A note: Let me point out that SPListItem.File is not null for document library items.</p>