Mono Class Library: System.Type Overview | Members

System.Type.HasElementType Property

Gets a bool value indicating whether the type represented by the current instance encompasses or refers to another type; that is, whether the current Type is an array, a pointer, or is passed by reference.

public bool HasElementType { get; }

Value

true if the Type is an array, a pointer, or is passed by reference; otherwise, false.

Remarks

This property is read-only.

Note: For example, Type.GetType(string, bool, bool)("int []").HasElementType returns true, but Type.GetType(string, bool, bool)("int ").HasElementType returns false. Type.HasElementType also returns true for "Int32*" and "Int32&".

If the current instance represents a generic type, or a type parameter of a generic type or method, this property returns false.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0