Type.GetEnumValues Methode

Definition

Gibt ein Array der Werte der Konstanten im aktuellen Enumerationstyp zurück.

public:
 virtual Array ^ GetEnumValues();
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("It might not be possible to create an array of the enum type at runtime. Use Enum.GetValues<T> or the GetEnumValuesAsUnderlyingType method instead.")]
public virtual Array GetEnumValues();
public virtual Array GetEnumValues();
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("It might not be possible to create an array of the enum type at runtime. Use the GetEnumValues<TEnum> overload or the GetEnumValuesAsUnderlyingType method instead.")]
public virtual Array GetEnumValues();
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("It might not be possible to create an array of the enum type at runtime. Use Enum.GetValues<T> or the GetEnumValuesAsUnderlyingType method instead.")>]
abstract member GetEnumValues : unit -> Array
override this.GetEnumValues : unit -> Array
abstract member GetEnumValues : unit -> Array
override this.GetEnumValues : unit -> Array
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("It might not be possible to create an array of the enum type at runtime. Use the GetEnumValues<TEnum> overload or the GetEnumValuesAsUnderlyingType method instead.")>]
abstract member GetEnumValues : unit -> Array
override this.GetEnumValues : unit -> Array
Public Overridable Function GetEnumValues () As Array

Gibt zurück

Ein Array, das die Werte enthält. Die Elemente des Arrays werden nach den Binären Werten (d. h. den nicht signierten Werten) der Enumerationskonstanten sortiert.

Attribute

Ausnahmen

Der aktuelle Typ ist keine Enumeration.

Gilt für: