[SIZE=2][COLOR=#000000]Public Class VArray(Of ItemType)[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]Dim myArray(,) As ItemType[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]Public Sub New(ByVal XDim As Integer, ByVal YDim As Integer)[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] ReDim myArray(XDim, YDim)[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]End Sub[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]Default Public Property Value(ByVal X As Integer, ByVal Y As Integer) As ItemType[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] Get[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] Return myArray(X, Y)[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] End Get[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] Set(ByVal value As ItemType)[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] MessageBox.Show(String.Format("Element ({0}, {1}) changed from {2} to {3}", X, Y, myArray(X, Y), value))[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] myArray(X, Y) = value[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] End Set[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]End Property[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000]End Class[/COLOR][/SIZE]