Wednesday, 23 January 2019

What Is an "Array"

What Is an "Array"?

Answer:

Arrays are vital for most programming languages. They are collections of variables, which we call elements.

An array’s elements in C# are numbered with 0, 1, 2, … N-1. Those numbers are called indices. The total number of elements in a given array we call length of an array.
All elements of a given array are of the same type, no matter whether they are primitive or reference types. This allows us to represent a group of similar elements as an ordered sequence and work on them as a whole.
Arrays can be in different dimensions, but the most used are the one-dimensional and the two-dimensional arrays. One-dimensional arrays are also called vectors and two-dimensional are also known as matrices.

No comments:

Post a Comment