title: declaring a list inside a class and it's the same list in every instance?
body: <p>I created a class like this:</p>
  
  <pre><code>public class MyClass
   {
       public List&lt;int&gt; Params = new List&lt;int&gt;();
  
        public void Load(int data)
          {
              Params.Add(data);
          }
  }
  </code></pre>
  
  <p>Then i initiate, let's say, three instances of the class.</p>
  
  <pre><code>MyClass one = new MyClass();
  MyClass two = new MyClass();
  MyClass three = new MyClass();
  </code></pre>
  
  <p>add the list with data:</p>
  
  <pre><code>one.Load(10);
  two.Load(50);
  three.Load(100);
  </code></pre>
  
  <p>then surprisingly when i check:</p>
  
  <pre><code>one.Params.Count();
  </code></pre>
  
  <p>the count is 3, also</p>
  
  <pre><code>two.Params.Count(); 
  </code></pre>
  
  <p>is also 3</p>
  
  <p>each instance list got three numbers - i.e. the same list.
  Somehow instead of separated lists i got pointers to the same list.
  How would you make it into three different stand alone lists with each instance ?</p>