title: StackOverflowExeption converting Dictionary<T, V> to List<KeyValuePair<T, V>>
body: <p>I'm not the best at C# and I got a stack overflow exeption in this code:</p>
  
  <pre><code>private Dictionary&lt;T, V&gt; collection;
  internal List&lt;KeyValuePair&lt;T, V&gt;&gt; ToList()
  {
      return collection.ToList(); //the VS debugger breaked here
  }
  </code></pre>
  
  <p>Here is the full class: <a href="http://pastebin.com/ji0Vrm0X" rel="nofollow">http://pastebin.com/ji0Vrm0X</a><br>
  Hope someone can find the stack overflow exeption.</p>
  
  <p>heres some more information :$</p>
  
  <pre><code>  internal QueuedDictionary&lt;int, RoomUser&gt; UserList
          {
              get
              {
                  return userlist;
              }
          }
  
      internal List&lt;RoomUser&gt; GetRoomUsers()
      {
          List&lt;KeyValuePair&lt;int, RoomUser&gt;&gt; users = UserList.ToAList();
  
          List&lt;RoomUser&gt; returnList = new List&lt;RoomUser&gt;();
          foreach (KeyValuePair&lt;int, RoomUser&gt; pair in users)
          {
              if (!pair.Value.IsBot)
                  returnList.Add(pair.Value);
          }
  
          return returnList;
      }
  </code></pre>