C# Array Class

In C#, every array created is automatically derived from the System.Array class. This class defines several methods and properties that can be used to manipulate arrays more efficiently.

MethodPurpose
Clear()It sets a range of elements to empty values
CopyTo()It copies elements from the source array into the destination array
GetLengthIt gives the number of elements in a given dimension of the array
GetValue()It gets the value for a given index in the array
Length()It gives the length of an array
SetValue()It sets the value for a given index in the array
Reverse()It reverses the contents of a one-dimensional array
Sort()It sorts the elements in a one-dimensional array