How to compare objects in C#
<p>How do you compare objects in C#. Here is a sample of my code</p>

<pre><code>namespace MyService
{
    public static class CurrentVCobj
    {
        public static string id { get; set; }
        public static string Month { get; set; }
        public static string Year { get; set; }
    }

    public static class ResponseVCObj
    {
        public static string id { get; set; }
        public static string Month { get; set; }
        public static string Year { get; set; }
    }
}
</code></pre>

<p>I would like to assign values to the above objects (CurrentVCobj and ResponseVCObj) then compare(TRUE OR FALSE) them in the method below to see if they are equal</p>

<pre><code>public static  void compareMethood(IEnumerable&lt;tets&gt; vc )
{             
    var myvar = vc;
    var mycac = rep.populateDict();

    foreach (var item in myvar)
    {
        ResponseVCObj.id = item.id;
        ResponseVCObj.Month = DateRange.Month;
        ResponseVCObj.Year = DateRange.Year;

        CurrentVCobj.id = currentV.Select(d =&gt; d.Value.id).ToString() ;
        CurrentVCobj.Month = currentV.Select(d =&gt; d.Value.Month).ToString();
        CurrentVCobj.Year = currentV.Select(d =&gt; d.Value.Year).ToString();

        //COMPARE OBJECTS HERE               
     }
}
</code></pre>
