' Visual Basic 2008 9.0 .NET Examples - Containment - Object Oriented Programming : Class Position Private m_X As Integer Public Property X() As Integer Get X = m_X End Get Set(ByVal value As Integer) m_X = value End Set End Property Private m_Y As Integer Public Property Y() As Integer Get Y = m_Y End Get Set(ByVal value As Integer) m_Y = value End Set End Property End Class Module PositionTextFixture Sub Main() Dim position1 As Position = New Position Console.WriteLine(position1.X = 0) Console.WriteLine(position1.Y = 0) ' position1.X = 5 Console.WriteLine(position1.X = 5) Console.WriteLine(position1.Y = 0) ' position1.Y = 10 Console.WriteLine(position1.X = 5) Console.WriteLine(position1.Y = 10) ' Console.ReadLine() End Sub End Module ' Visit www.studyvb.com for more examples. Copyright 2003-2008 De Wolf.