Where we should use VAR in C#?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/41479/use-of-var-keyword-in-c">Use of var keyword in C#</a>  </p>
</blockquote>



<p>Hello Experts,</p>

<p>There is a class(Test).</p>

<p>Class Test()</p>

<p>{</p>

<p>Test()</p>

<p>{</p>

<p>Console.WriteLine("Welcome");</p>

<p>}</p>

<p>static void Main()</p>

<p>{</p>

<p>Test obj = new Test(); .........1</p>

<p>var obj = new Test(); ...........2</p>

<p>}</p>

<p>I can create instance of Test class to use both 1 and 2 line. Can anyone tell me what is difference between above both line and why, where should we use VAR?</p>

<p>Thanks in advance.</p>
