title: string and class are both reference type, then why the comparasion returns different result?
body: <p>I'm comparing 2 strings and 2 class objects, then why string one comparison gives results "TRUE", whereas objects comparison give "FALSE"? Please explain whats going in term of memory locations in both teh case?</p>
  
  <pre><code>class Program
  {
      public class Person
      {
          public string Name { get; set; }
      }
  
      static void Main(string[] args)
      {
          string s1 = "xyz";
          string s2 = "xyz";
  
          bool b = s1 == s2;
  
          Person p1 = new Person();
          Person p2 = new Person();
  
          bool x = p1 == p2;
  
      }
  }
  </code></pre>