Arrays

suggest change

Syntax

<type>[] <name>;

<type>[,] <name> = new <type>[<value>, <value>];

<type>[][] <name> = new <type>[<value>][];

<name>[<value>] = new <type>[<value>];

<name> = new <type>[<length>];

<name> = new <type>[] {<value>, <value>, <value>, …};

<name> = new <type>[,] { {<value>, <value>}, {<value>, <value>}, …};

<name>[i]

<name>.Length

Remarks

In C#, an array is a reference type, which means it is nullable.

An array has a fixed length, which means you cant .Add() to it or .Remove() from it. In order to use these, you would need a dynamic array - List or ArrayList.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Arrays:
* Arrays

Table Of Contents
17 Regex
19 Arrays
21 Enum
22 Tuples
24 GUID
27 Looping
36 Casting
46 Methods
88 Events
92 Structs
104 Indexer
106 Stream
107 Timers
109 Threading
127 Caching
135 Pointers
147 C# Script