title: Iteration through SortedList
body: <pre><code>SortedList&lt;string, systemuser&gt; Users = new SortedList&lt;string, systemuser&gt;();
  Users.Add("username1",customobject);
  Users.Add("username2",customobject);
  Users.Add("username3",customobject);
  </code></pre>
  
  <p>What i'm trying to do is search the list for a specific key (i.e. a username) and return the next item in the list. If i'm at the end of the list then I need to return the item in the first position.</p>
  
  <p>Not sure how to go about this, as the SortedList doesn't seem to expose an index property.</p>
  
  <p>I have:</p>
  
  <pre><code>foreach (KeyValuePair&lt;string, systemuser&gt; pair in Users)
  {
      if (pair.Key == lastAllocation)
      {
          // RETURN THE ITEM IMMEDIATELY AFTER THIS ONE
      }
  }
  </code></pre>
  
  <p>Any suggestion appreciated!</p>