Imports System
Namespace ArrayOfObjects
Class Table
Private width, height As Single
Public Sub New()
End Sub
Public Sub New(ByVal width As Single, ByVal height As Single)
Me.width = width
Me.height = height
End Sub
Public Property Width As Single
Set(ByVal value As Single)
width = value
End Set
Get
Return width
End Get
End Property
Public Property Height As Single
Set(ByVal value As Single)
height = value
End Set
Get
Return height
End Get
End Property
Public Sub ShowData()
Console.WriteLine("Width: {0}, Heigth: {1}", width, height)
End Sub
End Class
Class TestTables
Private Shared Sub Main()
Dim debug As Boolean = False
Dim myTables As Table() = New Table(9) {}
Dim rnd As Random = New Random()
For i As Integer = 0 To 10 - 1
myTables(i) = New Table(rnd.[Next](50, 201), rnd.[Next](50, 201))
myTables(i).ShowData()
Next
If debug Then Console.ReadLine()
End Sub
End Class
End Namespace