title: How to add enum values to a list
body: <p>I have the following enum:</p>
  
  <pre><code>public enum SymbolWejsciowy
  {
       K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 
  }
  </code></pre>
  
  <p>I want to create a list using the values of this enum:</p>
  
  <pre><code> public List&lt;SymbolWejsciowy&gt; symbol;
  </code></pre>
  
  <p>I have tried a couple different ways to add the enum values to the list:  </p>
  
  <pre><code>SymbolWejsciowy symbol;  
  symbol.Add(symbol = SymbolWejsciowy.K1); 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>symbol.Add(SymbolWejsciowy.K1); 
  </code></pre>
  
  <p>However, I always get the following exception:</p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>
  
  <p>How can I correctly accomplish this?</p>