title: How to get a list of UIDs in reverse order with MailKit?
body: <p>I would like to get the latest 100 UIDs from the inbox using MailKit. I am accessing a Gmail mailbox which does not appear to support the SORT extension so I am unable to use OrderBy.</p>
  
  <p>Here is my code. The problem is that it appears to retrieve the oldest 100 emails rather the latest ones (which is how I would expect it to work). Is there a way to do this?</p>
  
  <p>Option A - looks promising only gets the 100 oldest emails UIDs and I want the 100 newest:</p>
  
  <pre><code>            imap.Inbox.Open(FolderAccess.ReadOnly);
              var orderBy = new [] { OrderBy.ReverseArrival };
              var items = imap.Inbox.Fetch(0, limit, MessageSummaryItems.UniqueId);
  </code></pre>
  
  <p>Option B - gets <em>all</em> UIDs by date order (but does not work on Gmail anyway):</p>
  
  <pre><code>            imap.Inbox.Open(FolderAccess.ReadOnly);
              var orderBy = new [] { OrderBy.ReverseArrival };
              SearchQuery query = SearchQuery.All;
              var items = imap.Inbox.Search(query, orderBy);
  </code></pre>
  
  <p><em>The IMAP server does not support the SORT extension.</em></p>
  
  <p>The reason is to quickly scan the mailbox in order to improve responsiveness to user. </p>