title: How to declare a global variable to be used on a C# expression
body: <p>I´m doing this :</p>
  
  <pre><code>protected void btn_Click(object sender, EventArgs e){
  
  var myQuery = from tab1 in Table
                where myConditions
                select tab1 ;
  </code></pre>
  
  <p>After that, I´m filtering with user selected choices :</p>
  
  <pre><code>myQuery.Where(x =&gt; x.someField == someChoice);
  </code></pre>
  
  <p>It´s working fine. But I would like to declare the "myQuery" with global escope.</p>
  
  <p>How should I do that ? I´m trying to put the line below inside the class and outside the method, but I don´t know what type should I use :</p>
  
  <pre><code>private someTypeThatIdontKnow myQuery;
  </code></pre>
  
  <p>TIA.</p>