Do containers of primitive types in C# use value semantics or pointer/reference semantics?
<p>When a <code>List&lt;&gt;</code> of primitive types is created in C# (e.g. a <code>List&lt;int&gt;</code>), are the elements inside the list stored by value, or are they stored by reference?</p>

<p>In other words, is C# <code>List&lt;int&gt;</code> equivalent to C++ <code>std::vector&lt;int&gt;</code> or to C++ <code>std::vector&lt;shared_ptr&lt;int&gt;&gt;</code>?</p>
