LANGUAGE

Array declaration

Declares a one-dimensional array with a specified element type. Its length is fixed after creation.

Formal Syntax & Structure

csharp syntaxcsharp
T[] values = { ... };

Working Example

Example Snippetcsharp
int[] values = { 1, 2 };
C# & .NET Reference