title: c# refrencing list
body: <p>I wanted to know: How to add new members to the list, so that when I change the values of variables will also change the list.</p>
  
  <p>For example:</p>
  
  <pre><code>int a=4;
  
  list&lt;int&gt; l=new list&lt;int&gt;();
  
  l.Add(a);
  
  a=5;
  
  foreach(var v in l)
    Console.WriteLine("a="+v);
  </code></pre>
  
  <p>Output:
  a=4</p>
  
  <p>thanks</p>