title: Use var keyword for variable in razor view engine instead of declaring with explicit data type
body: <p>Its been few months that I am using Razor as a view engine in my ASP.NET MVC applications and I am using variable like:</p>
  
  <pre><code>string myVariable = "My Variable String";
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>int count = 0;
  </code></pre>
  
  <p>But today i find out that we should only declare variable with var keyword.</p>
  
  <blockquote>
    <p>Variables are declared with the var keyword according to <a href="http://www.w3schools.com/asp/razor_syntax.asp" rel="nofollow noreferrer">w3school</a>
    and 
    All the variable in official asp.net razor documentation, they are using var keyword in <a href="https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor" rel="nofollow noreferrer">razor documentation example</a>.</p>
  </blockquote>
  
  <p>So my questions are:</p>
  
  <blockquote>
    <ol>
    <li><p>What is the benefit of using var keyword instead of explicitly specifying the type of the variable?</p></li>
    <li><p>As I told you, I am using string and int type variable, am I doing wrong?</p></li>
    </ol>
  </blockquote>