What is an array?

In C#, an array is a collection of the same type of values stored as a single variable. It is generally a comma-separated list of values enclosed in curly brackets. An array can be stored as a single variable. For example, {10, 20, 30} is an array of integers. It can be stored as a variable, as shown in the code below:

Get hands-on with 1200+ tech skills courses.