EnumDescription.GetValue Method

Gets the value of an Enum, based on it's Description Attribute or named value
Public Shared Function GetValue( _ 
ByVal value As Type, _ 
ByVal description As String
) As Object
This language is not supported or no code example is available.
public static object GetValue( 
Type value
string description 
)
This language is not supported or no code example is available.

Parameters

value
Type

The Enum type

description
string

The description or name of the element

Return Value

object

The value, or the passed in description, if it was not found

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition