O'Reilly logo

Essential .NET, Volume 1: The Common Language Runtime by Chris Sells, Don Box

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Arrays

The CLR supports two kinds of composite types: one kind whose members are accessed by a locally unique name, and another whose members are unnamed but instead are accessed by position. The classes and structs described so far are examples of the former. Arrays are an example of the latter.

Arrays are instances of a reference type. That reference type is synthesized by the CLR based on the element type and rank of the array. All array types extend the built-in type System.Array, which is shown in Listing 5.11. This implies that all of the methods of System.Array are implicitly available to any type of array. That also means that one can write a method that accepts any type of array by declaring a parameter of type System.Array. In essence, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required