title: Is List<T> a pointer?
body: <p>I noticed that the behavior of <code>List&lt;T&gt;</code> is different from an other simple object, say <code>String</code> for example. The question can seem newbie but that really struck me cause I thought that <code>List&lt;T&gt;</code> were simple objects.</p>
  
  <p>Take for instance the following code:</p>
  
  <pre><code>List&lt;String&gt; ls1 = new List&lt;String&gt;();
  ls1.Add("a");
  List&lt;String&gt; ls2 = ls1;
  ls1.Add("b");
  </code></pre>
  
  <p>At the end, <code>ls1</code> will be equal to <code>{"a", "b"}</code> and so will <code>ls2</code>. This is really different from the behavior of this code:</p>
  
  <pre><code>String s1 = "a";
  String s2 = s1;
  s1 = "b";
  </code></pre>
  
  <p>Where <code>s1</code> is at the end equal to <code>b</code> and <code>s2</code> equal to <code>a</code>.</p>
  
  <p>That means that <code>List&lt;T&gt;</code> is in fact a pointer right?</p>