title: .net memberwiseclone shallow copy not working
body: <p>I am using this.MemberwiseClone() to create shallowcopy but it is not working. Please look at the code below.</p>
  
  <pre><code>public class Customer
      {
  
          public int Id;
          public string Name;
  
          public Customer CreateShallowCopy()
          {
              return (Customer)this.MemberwiseClone();
          }
      }
  
  class Program
  {
      static void Main(string[] args)
      {
          Customer objCustomer = new Customer() { Id = 1, Name = "James"};
          Customer objCustomer2 = objCustomer;
  
          Customer objCustomerShallowCopy = objCustomer.CreateShallowCopy();
  
          objCustomer.Name = "Jim";
          objCustomer.Id = 2;            
      }
  }
  </code></pre>
  
  <p>When I run the program, It shows objCustomerShallowCopy.Name as "James" rather than "Jim".</p>
  
  <p>Any Ideas??</p>