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.
Method | Purpose |
Clear() | It sets a range of elements to empty values |
CopyTo() | It copies elements from the source array into the destination array |
GetLength | It 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 |