The Built-In Methods of System.Array

Recall how the System.String class provides any object of type string with a large number of methods and properties. The System.Array class also has numerous built-in methods and properties, providing useful functionality when working with arrays. You have already met a couple of these in the form of the Length property and the GetLength method. As usual, we apply the dot . operator to reach this built-in functionality

accountBalances.Length   //Returns the length of accountBalances

which calls the Length property of accountBalances.

The complete collection of methods and properties is listed in the .NET Frameworks Reference, along with their descriptions. Table 11.3 merely presents a few of the most commonly ...

Get C# Primer Plus now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.