Type.GetEnumUnderlyingType Metodo

Definizione

Restituisce il tipo sottostante del tipo di enumerazione corrente.

public:
 virtual Type ^ GetEnumUnderlyingType();
public virtual Type GetEnumUnderlyingType();
abstract member GetEnumUnderlyingType : unit -> Type
override this.GetEnumUnderlyingType : unit -> Type
Public Overridable Function GetEnumUnderlyingType () As Type

Valori restituiti

Tipo sottostante dell'enumerazione corrente.

Eccezioni

Il tipo corrente non è un'enumerazione.

oppure

Il tipo di enumerazione non è valido, perché contiene più campi dell'istanza.

Commenti

Per impostazione predefinita, il tipo sottostante di un'enumerazione in C# e Visual Basic è Int32. È possibile specificare altri tipi integer.

Si applica a