How to compare values of two objects in C#
<p>I created a struct</p>

<pre><code> public struct MyCalender : IComparable&lt;MyCalender&gt;
{
 public int CompareTo(PersianDate other)
    {
        return DateTime.Compare(this, other);
    }
 .
 .
 .
 .
 .
}
</code></pre>

<p>I new two object of this in a other UserControl, and i want compare they. </p>

<p>I use this code but i get error.</p>

<pre><code> MyCalender value = new MyCalender(2010,11,12);
 MyCalender value2 = new MyCalender(2010,11,12);
        if (value &lt; value2) ==&gt; geterror
</code></pre>
