Array Initializer

A brace-enclosed list of values used to fill an array when it is created.

What is Array Initializer in C#?

Array Initializer — A brace-enclosed list of values used to fill an array when it is created.

class Route
{
    string[] stops = { "Oak", "Pine", "Lake" };
    string secondStop = "Pine";
    int stopCount = 3;
}

Level: Apprentice · More C# terms at this level

Updated

In other subjects