Type.GetEnumValues Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Retourne un tableau des valeurs des constantes dans le type d’énumération actuel.
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
Retours
Tableau qui contient les valeurs. Les éléments du tableau sont triés par les valeurs binaires (autrement dit, les valeurs non signées) des constantes d’énumération.
- Attributs
Exceptions
Le type actuel n’est pas une énumération.