Enum.GetValuesAsUnderlyingType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetValuesAsUnderlyingType(Type) |
Retrieves an array of the values of the underlying type constants in a specified enumeration. |
GetValuesAsUnderlyingType<TEnum>() |
Retrieves an array of the values of the underlying type constants in a specified enumeration type. |
GetValuesAsUnderlyingType(Type)
- Source:
- Enum.cs
- Source:
- Enum.cs
- Source:
- Enum.cs
Retrieves an array of the values of the underlying type constants in a specified enumeration.
public:
static Array ^ GetValuesAsUnderlyingType(Type ^ enumType);
public static Array GetValuesAsUnderlyingType (Type enumType);
static member GetValuesAsUnderlyingType : Type -> Array
Public Shared Function GetValuesAsUnderlyingType (enumType As Type) As Array
Parameters
- enumType
- Type
An enumeration type.
Returns
An array that contains the values of the underlying type constants in enumType
.
Exceptions
enumType
is null.
enumType
is not an enumeration type.
Remarks
You can use this method to get enumeration values when it's hard to create an array of the enumeration type. For example, you might use this method for the MetadataLoadContext enumeration or on a platform where run-time code generation is not available.
Applies to
GetValuesAsUnderlyingType<TEnum>()
- Source:
- Enum.cs
- Source:
- Enum.cs
- Source:
- Enum.cs
Retrieves an array of the values of the underlying type constants in a specified enumeration type.
public:
generic <typename TEnum>
where TEnum : value class static Array ^ GetValuesAsUnderlyingType();
public static Array GetValuesAsUnderlyingType<TEnum> () where TEnum : struct;
static member GetValuesAsUnderlyingType : unit -> Array (requires 'Enum : struct)
Public Shared Function GetValuesAsUnderlyingType(Of TEnum As Structure) () As Array
Type Parameters
- TEnum
An enumeration type.
Returns
An array that contains the values of the underlying type constants in TEnum
.
Remarks
You can use this method to get enumeration values when it's hard to create an array of the enumeration type. For example, you might use this method for the MetadataLoadContext enumeration or on a platform where run-time code generation is not available.
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示