title: How does List<T>.IndexOf() search?
body: <p>Haven't found a definite answer on this so I'm going to ask it here. Sorry if I missed something.</p>
  <p>Say we have this class</p>
  <pre class="lang-cs prettyprint-override"><code>internal class MyClass
  {
      public MyClass()
      {
  
      }
      private string my_field;
      public string MyField
      { 
          get { return my_field; }
          set { my_field = value; }
      }
  }
  </code></pre>
  <p>and we create a <code>List&lt;MyClass&gt;</code> like this and populate it with testing info</p>
  <pre class="lang-cs prettyprint-override"><code>List&lt;MyClass&gt; my_list = new List&lt;MyClass&gt;();
  private void TestFunction()
  {
       MyClass mc = new MyClass();
       mc.my_field = &quot;test1&quot;;
       my_list.Add(mc);
  }
  
  </code></pre>
  <p>My question is, will <code>IndexOf()</code> return the real index of <code>mc</code> if I create an identical <code>MyClass</code> object with the same <code>my_field</code> value? If not, why ?</p>
  <pre class="lang-cs prettyprint-override"><code>private void SearchList()
  {
       MyClass mc = new MyClass();
       mc.my_field = &quot;test1&quot;;
       int index = my_list.IndexOf() // WILL THIS RETURN THE INDEX OF THE PREVIOUSLY ADDED &quot;mc&quot; OBJECT
  }
  </code></pre>