What is array?

What is array?

An array stores the same collection of data. It is typically used to store a fixed-size sequential collection of elements of the same type. Basically, it a collection of variables of the same type that are stored at contiguous memory locations. Instead of declaring individual variables, an array can be used to represent individual variables by declaring one array variable such as numbers.

In C#, an array can be declared by using the following syntax:

datatype[] arrayName;

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.