 | EnumTEnumParse Method |
Converts the string representation of the name or numeric value of one or
more enumerated constants to an equivalent enumerated object. A parameter
specifies whether the operation is case-insensitive.
Namespace: BobsAssembly: Bobs.Utilities (in Bobs.Utilities.dll) Version: 0.1.0-dev001
Syntaxpublic static TEnum Parse(
string value,
bool ignoreCase
)
Public Shared Function Parse (
value As String,
ignoreCase As Boolean
) As TEnum
public:
static TEnum Parse(
String^ value,
bool ignoreCase
)
static member Parse :
value : string *
ignoreCase : bool -> 'TEnum
Parameters
- value
- Type: SystemString
A string containing the name or value to convert. - ignoreCase
- Type: SystemBoolean
true to ignore case; false to regard case.
Return Value
Type:
TEnumAn object of type
TEnum whose value is represented by value.
ExceptionsException | Condition |
---|
ArgumentNullException | value is null. |
ArgumentException | value is either an empty string ("")
or only contains white space.-or- value is a name, but not one of the named
constants defined for the enumeration. |
OverflowException | value is outside the range of the underlying type of TEnum. |
See Also