Passing type 'var' into a method in C#
<p>I have some sub queries which are of data type var. These are getting working on a data table. I would like to pass these into another method, how can i do that?
Ex:</p>

<pre><code>    var subquery1= from results in table.AsEnumerable()
               where //some condition
               select new
               {
                  column1=results.field1,
                  column2 = results.field2
                  etc.,
               }
     var subquery2= from results in table.AsEnumerable()
               where //different condition
               select new
               {
                  column1=results.field1,
                  column2 = results.field2
                  etc.,
               }
</code></pre>

<p>Now, I would like to define some method to pass these subquery1, subquery2 as variables.
ex: </p>

<pre><code>void updategrid(var queries)
          {
          //some logic
           }
</code></pre>

<p>And execute the method: </p>

<pre><code>updategrid(subquery1);
updategrid(subquery2);
</code></pre>

<p>When i try to use var in the method when defining it is not liking it. Please help me in how to do that.
Thanks.</p>
