 <p>I'm just doing this off the cuff, but could have another class that holds that variable statically e.g.</p> <pre><code>public class StaticContainer { public static int incrementor { get; set; } } </code></pre> <p>then in your student class increment the variable in the constructor</p> <pre><code>public class Student { public Student() { StaticContainer.incrementor++; } } </code></pre>