title: How do I copy an instance of an object?
body: <p>I'm trying to write some code that populates a <code>List</code> (actually, it's a series of <code>Lists</code>, but we can pretend it's just one <code>List</code>).  The idea is to add an <code>IPackage</code> to the <code>List</code> for the total quantity of <code>IPackage</code> on order.  See the following code:</p>
  
  <pre><code>        ParseExcel pe = new ParseExcel();
          Pinnacle p = pe.ParsePinnacleExcel();
          Rack r = new Rack(20,2,4.5,96,42,6,25*12);
          foreach (PinnacleStock ps in p.StockList.Where(x =&gt; 
                   x.ColorCode == "10" &amp;&amp; 
                   x.PackageLength == 30.64))
          {
              for (int i = 1; i &lt;= ps.OnOrder; i++)
              {
                  r.TryAddPackage((IPackage)ps);
              }
          }
  </code></pre>
  
  <p>Everything seems to be working well, insofar as the <code>IPackage</code> is repeatedly added to the list.  However, it seems that the same instance of the object is being added, i.e. the object is not being copied each time it's added to the list.</p>
  
  <p><strong>What do I need to do to ensure that a</strong> <strong><em>copy</em></strong> <b>of the object is inserted into the list, and not just an additional reference?</b></p>