Class Item gets empty when List.Clear() using c#
<p>This is my class declaration:</p>

<pre><code>    List&lt;Carton&gt; Cartons = new List&lt;Carton&gt;();
    public class Carton
    {
        public string CartonLabel;
        public string PN;
        public List&lt;string&gt; Serials;            
    }
</code></pre>

<p>This is a generic list that I will use at the end to assign it to Carton.Serials</p>

<pre><code>    List&lt;string&gt; Serials = new List&lt;string&gt;();
</code></pre>

<p>Why Carton.Serials become empty when I do: <code>Serials.Clear()</code></p>

<pre><code>    if (Serials.Count &gt; 0)
                        {
                            Carton CartonItem = new Carton();
                            CartonItem.CartonLabel = CartonData;
                            CartonItem.PN = PNData;
                            CartonItem.Serials = Serials;
                            Cartons.Add(CartonItem);
                            Serials.Clear();
                        }
</code></pre>
