public class Test
public Shared Sub Main
Dim start_time As DateTime
Dim stop_time As DateTime
Dim elapsed_time As TimeSpan
Dim num_items As Integer = 10000
' Two-dimensional Array.
Dim array4 As Array = _
Array.CreateInstance(GetType(Integer), 1, num_items)
start_time = Now
For i As Integer = 0 To num_items - 1
array4.SetValue(i, 0, i)
Next i
stop_time = Now
elapsed_time = stop_time.Subtract(start_time)
Console.WriteLine(elapsed_time.TotalSeconds())
Erase array4
End Sub
End class
|