Modifying item after addition to List does not update list
<p>I have a member variable which is a list of reference types.  In a method I create and item, add it to the list.  The item is then updated point to another instance but the instance in the list does not get updated (his is in some unit test code).  Example looks like</p>

<pre><code>Item localItem = new Item(arg1, arg2);
this.itemList.Add(localItem);

// Do some testing and assertions

localItem = new Item(arg3, arg4);  // This does not update the instance of
                                   // localItem in this.ItemList

// Do some more testing and assertions
</code></pre>

<p>I can update my tests to fix this but it still caught me by surprise.  I supose the List wants to keep the original instance passed through the <code>Add</code> method and cares not if the local variable which was used to pass it in now points to something else.  Can anyone maybe confirm this understanding or explain it more clearly?</p>
