' Visual Basic 2008 9.0 .NET Examples - Introduction to Object Oriented Programming - Object Oriented Programming : Class Person Private m_Name As String ' (1) Public Function GetName() As String ' (2) GetName = m_Name End Function Public Sub SetName(ByVal value As String) ' (3) m_Name = value End Sub End Class Module Client1 Sub Main() Dim person1 As New Person ' (4) person1.SetName("John") ' (5) Console.WriteLine(person1.GetName()) ' (6) ' Dim person2 As New Person person2.SetName("Jane") Console.WriteLine(person2.GetName()) ' Console.ReadLine() End Sub End Module Module Client2 Sub Main() Dim person1 As Person person1.SetName("John") ' (1) End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.