' Visual Basic 2008 9.0 .NET Examples - Constructors - Object Oriented Programming : Class Counter Public Sub New(ByVal value As Integer) m_Value = value End Sub Protected m_Value As Integer Public Function GetValue() As Integer GetValue = m_Value End Function Public Sub Raise() m_Value += 1 End Sub Public Sub Lower() m_Value -= 1 End Sub End Class Module Exercise8Solution Sub Main() Dim counter1 As Counter = New Counter(5) Console.WriteLine(counter1.GetValue() = 5) ' Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.