Type.HasElementType Property
.NET Framework (current version)
Gets a value indicating whether the current Type encompasses or refers to another type; that is, whether the current Type is an array, a pointer, or is passed by reference.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System.Booleantrue if the Type is an array, a pointer, or is passed by reference; otherwise, false.
Implements
_Type.HasElementTypeFor example, Type.GetType("Int32[]").HasElementType returns true, but Type.GetType("Int32").HasElementType returns false. HasElementType also returns true for "Int32*" and "Int32&".
If the current Type represents a generic type, or a type parameter in the definition of a generic type or generic method, this property always returns false.
Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Show: