title: Comparing Two Objects
body: <p>Using Object.Equals results in a false with two newly created objects using the same constructor.  Why is this?  I want to be able to compare two objects and see if they are the same, in other words, I want to do the same test as above, but I want to be able to get a true on the first test (since the two objects should be identical). </p>
  
  <p>How can I accomplish this without building my own compare method for any particular class. </p>
  
  <pre><code>using System;
  class Program
  {
      static void Main(string[] args)
      {
          Object Obj1 = new Object();
          Object Obj2 = new Object();
          Console.WriteLine(Obj1.Equals(Obj2));
          Obj2 = Obj1;
          Console.WriteLine(Obj1.Equals(Obj2)); 
      }
  }
  
  /* This example produces the following output:
  False
  True
   */
  </code></pre>
  
  <p>Addendum:</p>
  
  <pre><code>Object o1 = new Object();
  Object o2 = new Object();
  
  o1.value1 = 1;
  o2.value1 = 1;
  
  //Now I want to compare o1 and o2 and see if they are equal
  //Can I do this without building my own function?
  </code></pre>