GetArrayRank Method
Collapse the table of content
Expand the table of content

Type.GetArrayRank Method ()


Gets the number of dimensions in an array.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

abstract GetArrayRank : unit -> int
override GetArrayRank : unit -> int

Return Value

Type: System.Int32

An integer that contains the number of dimensions in the current type.

Exception Condition

The functionality of this method is unsupported in the base class and must be implemented in a derived class instead.


The current type is not an array.

The following example displays the number of dimensions in an array.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2016 Microsoft