title: how to clone a list object
body: <p>Hi i am trying to clone a object which has a member list object</p>
  
  <pre><code> public class GrossTemplatesInfo
  {
      public List&lt;GrossTemplates&gt; grossTemplates { get; set; }
      public object Clone()
      {
          GrossTemplatesInfo other = (GrossTemplatesInfo)this.MemberwiseClone();
          other.grossTemplates = new List&lt;GrossTemplates&gt;(grossTemplates);
          return other;
      }
  }
  public class GrossTemplates : ICloneable
  {
      public string tempID { get; set; }
      public string PreferenceName { get; set; }
      public string PreferenceValue { get; set; }
      public bool isDefault { get; set; } 
      object ICloneable.Clone()
      {
          return this.Clone();
      }
      public object Clone()
      {
          return this.MemberwiseClone();
      }
  
  }
  </code></pre>
  
  <p>and my method is something like this</p>
  
  <pre><code>public static GrossTemplatesInfo LoadInitialdata(string caseType)
      {
          GrossTemplatesInfo a = new GrossTemplatesInfo();
         GrossTemplatesInfo b = a.Clone() as GrossTemplatesInfo; 
      }
  </code></pre>
  
  <p>I have done this and i am not getting the values in cloned object 'b' that are in original object 'a'. any help? i am kinda new to this cloning mechanism. </p>