title: How to compare Two Object -Exclude specific Properties in Comparison
body: <p>I have a case there I want to compare two objects in c#.Also I would have option to exclude specific properties when comparing. Can anyone suggest a better approach. Class will look like as below</p>
  
  <pre><code>public class Address
  {
      public string AddressID { get; set; }
      public int AddressStagingID { get; set; }
      public string Address1 { get; set; }
      public string Address2 { get; set; }
      public string City { get; set; }
      public string County { get; set; }
      public string Postcode { get; set; }
      public string Country { get; set; }
      public bool PreferredAddress { get; set; }
      public int? DBID { get; set; }
      public Enum AddressStatus Status { get; set; }
  }
  </code></pre>
  
  <p>I need to have a function like</p>
  
  <pre><code>private bool IsAddressModified(Address currentAddress,Address existingAddress)
      {
      }
  </code></pre>