title: Comparing two instances of a class
body: <p>I have a class like this</p>
  
  <pre><code>public class TestData
  {
     public string Name {get;set;}
     public string type {get;set;}
  
     public List&lt;string&gt; Members = new List&lt;string&gt;();
  
     public void AddMembers(string[] members)
     {
        Members.AddRange(members);
     }   
  }
  </code></pre>
  
  <p>I want to know if it is possible to directly compare to instances of this class to eachother and find out they are exactly the same? what is the mechanism? I am looking gor something like <code>if(testData1 == testData2) //Do Something</code> And if not, how to do so?</p>