January 2003
Intermediate to advanced
896 pages
19h 58m
English
The System.Array class represents a simple collection of objects. In fact, you never instantiate this class directly. Instead, you use the built-in language features. The following C# example illustrates the use of the Array class:
int[] myIntArray = new int[10];
You code the same thing in Visual Basic .NET in one of two ways:
Dim myIntArray() As Integer = New Integer(9) {}
Dim myIntArray(9) As Integer ’implies New Integer(9)In C#, you must use the new language keyword to initialize an array. If you leave it out, the array variable is uninitialized and points to nothing.
You must include the initialization braces {} when declaring an array in Visual Basic using the New keyword, even if you do not supply any initialization values; ...
Read now
Unlock full access