Type.GetEnumName(Object) Method
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.
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
- value
- Object
The value whose name is to be retrieved.
The name of the member of the current enumeration type that has the specified value, or null
if no such constant is found.
The current type is not an enumeration.
-or-
value
is neither of the current type nor does it have the same underlying type as the current type.
value
is null
.
Produit | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :