title: Name doesnot exist in the current context error in c#
body: <p>I have 2 methods in my class. I call <code>selectAll</code> method in <code>GetDb</code>. when I put a break point in <code>selectAll</code> method, I can see the values return in var all. Yet, when I go and find in the <code>GetDb</code> method, var list is not demonstrating the values. Truth be told it is not tossing errors moreover. When I go and find in Quick watch it is saying that:</p>
  
  <blockquote>
    <p>The name 'list' does not exist in the current context.</p>
  </blockquote>
  
  <p>Am I missing anything here? Anyhelp would be really appriciated.. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>private void GetDb()
  {
       var list = selectAll();
  }
  
  public List&lt;ticketinfo&gt; selectAll()
  {
       var all = db.ticketinfoes.Where(x =&gt; x.TaskType == "WINDOWSADMIN").ToList();
       return all;
  }
  </code></pre>