//Visual Basic 2010 Constructoren - New Object Oriented Programming public class Counter { protected int m_Value; public Counter(int value) { this.m_Value = value; } public virtual void GetValue() { GetValue = this.m_Value; } public virtual void Raise() { this.m_Value += new System.EventHandler(1); } public virtual void Lower() { this.m_Value = 1; } } public class Exercise8Solution { void Main() { Counter counter1 = new Counter(5); Console.WriteLine((counter1.GetValue() == 5)); Console.ReadLine(); } } //Bezoek www.vbvoorbeelden.be voor meer C# voorbeelden. //Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.