title: c# list object is out of scope. Not sure how to handle it
body: <p>So, I have a simple C# application. The application lets a user enter a test score, and click Add button. When clicked, the text box contents (if valid) should enter into the list object. </p>
  
  <p>My current code is saying that it the object doesn't exist in the current context. </p>
  
  <pre><code>private void ScoreCalculatorApplication_Load(object sender, EventArgs e)
      {
          List&lt;int&gt; scoreList = new List&lt;int&gt;();
      }
  
      private void btn_Add_Click(object sender, EventArgs e)
      {
          scoreList.Add();//this line has the problem
      }
  </code></pre>
  
  <p>So, I am not sure why the scoreList doesnt exist, because the ScoreCalculatorApplication_Load method executes on loading the app. </p>
  
  <p>Anyway, I also considered something like this: </p>
  
  <pre><code>private void ScoreCalculatorApplication_Load(object sender, EventArgs e)
          {
               //remove this method.
          }
  
          private void btn_Add_Click(object sender, EventArgs e)
          {
             //is there a test to see if this object exists?
              if (//see if the list does not exist)
                  //if not existant, create it here.
              scoreList.Add();
          }
  </code></pre>
  
  <p>So, The problem is I dont know how to test if the object exists.</p>