title: Should I Implement ICloneable?
body: <p>I have written some codes and found that two classes (namely Fish and Mammal below) have a same pattern so I decided to sum up with generics.</p>
  
  <p>The problem is, I need copy a constructor from the <em>base</em> class part.</p>
  
  <p>Also, this can't be fixed using new() constraints (CS0304) since the constructors are not default (0-parameter) ones.</p>
  
  <p>I write this because I was told implementing ICloneable is not a good practice.</p>
  
  <pre><code>public class OneHeart {...}
  public class TwoHeart {...}
  
  public class Animal&lt;TyHeart&gt; /* : ICloneable ?*/ {
      public Animal(TyHeart heart) {
          if(heart==null) throw new ArgumentNullException();
          Heart = heart;
      }
      public Heart { get; set; }
  }
  public class Fish : Animal&lt;OneHeart&gt; {
      public Fish(OneHeart heart) : base(heart) {}
      public Fish(Fish fish) : base(fish.Heart) {} // copy ctor but no use?
  }
  public class Mammal : Animal&lt;TwoHeart&gt; {
      public Mammal(TwoHeart heart, Organ lung) : base(heart) {Lungs=lung;}
      public Mammal(Mammal mammal) : base(mammal.Heart) {Lungs=mammal.Lung;}
      public Organ Lungs {get; set;} // Mammal-only member:)
  }
  // The Zoo collects animals of only one type:
  public class Zoo&lt;TyHeart, TyAnimal&gt; : LinkedList&lt;TyAnimal&gt; 
      where TyAnimal : Animal&lt;TyHeart&gt; {
      public Zoo() : base() {}
      public Zoo(Zoo&lt;TyHeart, TyAnimal&gt; srcZoo) {
          foreach(var animal in srcZoo) {
              // CS0304 compile error:
              base.AddLast(new TyAnimal(animal));
          }
      }
      ...
  }
  </code></pre>
  
  <p>Fish and Mammal are the only classes derived from Animal and</p>
  
  <p>I know they both implement copy constructors.</p>
  
  <p>EDIT: No deep-copy needed. </p>
  
  <p>(Types of) Hearts and Lungs are singleton and shared among Animal/Fish/Mammal.</p>