title: Session object changes when object is updated in C#
body: <p>I have this really weird problem and I'm sure I'm missing something obvious here. I have these two lines:</p>
  
  <pre><code>HttpContext.Current.Session[listModelType + "ListModel"] = listModel;
  listModel.ProductRows = new Collection&lt;ProductRow&gt;(listModel.ProductRows.Where(r =&gt; r.ParentRowId == 0).ToList());
  </code></pre>
  
  <p>After the second line is executed my session object is updated as well (according to "Watch" in Visual Studio)</p>
  
  <p>What am I missing here?</p>
  
  <p>I have tried</p>
  
  <pre><code>int i = 0;
  HttpContext.Current.Session["i"] = i;
  i++;
  </code></pre>
  
  <p>and HttpContext.Current.Session["i"] remains 0.</p>