Corrected declaration of integer array. (#36575)
To declare an integer array, the correct way is: int[] name = new int[] {1, 2, 3}; and not int[] name = new name[] {1, 2, 3};
This commit is contained in:
committed by
Randell Dawson
parent
beadd801a7
commit
4fb8145163
@ -90,7 +90,7 @@ You can declare, initialize and assign values in the array all at once by using
|
|||||||
or simply:
|
or simply:
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
int [] nameOfArray = new nameOfArray[4] {2,9,56,1280};
|
int [] nameOfArray = new int[4] {2,9,56,1280};
|
||||||
int [] nameOfSecondArray = nameOfArray;
|
int [] nameOfSecondArray = nameOfArray;
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user