title: var in class gives error
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1929492/using-var-outside-of-a-method">Using var outside of a method</a>  </p>
  </blockquote>
  
  
  
  <pre><code>class A {
  string X;
  }
  // Proper
  class A {
  var X;
  }
  // Improper (gives error)
  </code></pre>
  
  <p>Why is it, that i cant have var type variable declare in Class and what can be done in order to achieve it OR what is an alternative ?</p>
  
  <p><strong>In function/method, i can declare a var type variable,then why can't, i do it in class ?</strong></p>
  
  <p>Thanks.</p>