title: Writing a custom comparer for a core class in C#
body: <p>I need to write a comparer for a core class in C#. I have a <code>SortedSet&lt;Vector2&gt;</code> and in order to iterate through it I need a basic comparer. Nothing fancy needed as I just need to access each element in the collection in any order. But Vector2 (<code>Microsoft.Xna.Framework.Graphics</code>) is a compiled dll without a default comparer. </p>
  
  <p>My <code>SortedSet</code> has a property <a href="http://msdn.microsoft.com/en-us/library/dd412070.aspx" rel="nofollow"><code>Comparer</code></a> but I cannot figure how to assign Comparer a Vector2 comparer. </p>