Type.GetEnumName(Object) Metodo
Definizione
Restituisce il nome della costante avente il valore specificato, per il tipo di enumerazione corrente.Returns the name of the constant that has the specified value, for the current enumeration type.
public:
virtual System::String ^ GetEnumName(System::Object ^ value);
public virtual string? GetEnumName (object value);
public virtual string GetEnumName (object value);
abstract member GetEnumName : obj -> string
override this.GetEnumName : obj -> string
Public Overridable Function GetEnumName (value As Object) As String
Parametri
- value
- Object
Valore di cui recuperare il nome.The value whose name is to be retrieved.
Restituisce
Nome del membro del tipo di enumerazione corrente avente il valore specificato oppure null
se tale costante non viene rilevata.The name of the member of the current enumeration type that has the specified value, or null
if no such constant is found.
Eccezioni
Il tipo corrente non è un'enumerazione.The current type is not an enumeration.
-oppure--or-
value
non è del tipo corrente e non presenta lo stesso tipo sottostante del tipo corrente.value
is neither of the current type nor does it have the same underlying type as the current type.
value
è null
.value
is null
.