VB.NET - kinds of multidimensional arrays

Briefly describe kinds of multidimensional arrays.

- Multidimensional arrays are just like a table structure with rows and column.

- It is also called as Matrix.

Syntax:
<datatype> [rowsize] [column];

Example:
int arr[3] [3];   // An array with 3 rows and 3 columns
or
int arr[3] [3] ={5,10,15,20};   //Two dimensional array with hard-coded values

Multidimensional arrays can be:

1. Rectangular arrays
2. Jagged arrays

1. Rectangular arrays:

- A rectangular array has the same number of columns in each row.

- These multidimensional arrays have all the sub-arrays with a particular dimension of the same length.

- You need to use a single set of square brackets for rectangular arrays.

2. Jagged arrays:

- A Jagged array can contain different number of columns in each row.

- These multidimensional arrays have each sub-array as independent arrays of different lengths.

- With these you need to use a separate set of square brackets for each dimension of the array.
VB.NET - What is encapsulation?
VB.NET - What is encapsulation? - It is the fundamental principles of object-oriented programming......
VB.NET method overloading
VB.NET - Define method overloading - It allows several methods with the same name but different signatures.....
VB.NET - Describe an abstract class
VB.NET - Describe an abstract class - An abstract class is a class that cannot be instantiated but must be inherited. ......
Post your comment