Enum..::..TryParse<(Of <(<'TEnum>)>)> Method (String, Boolean, TEnum%)
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-sensitive. The return value indicates whether the conversion succeeded.
Namespace:
System
Assembly:
Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public static bool TryParse<TEnum>( string value, bool ignoreCase, out TEnum result )
<TemplateAttribute> _ Public Shared Function TryParse(Of TEnum) ( _ value As String, _ ignoreCase As Boolean, _ <OutAttribute> ByRef result As TEnum _ ) As Boolean
[TemplateAttribute] public: generic<typename TEnum> static bool^ TryParse( String^ value, bool^ ignoreCase, [OutAttribute] TEnum% result )
Type Parameters
- TEnum
- The enumeration type to which to convert value.
Parameters
- value
- Type: System..::..String
The string representation of the enumeration name or underlying value to convert.
- ignoreCase
- Type: System..::..Boolean
true to ignore case; false to consider case.
- result
- Type: TEnum%
When this method returns, result contains an object of type TEnum whose value is represented by value if the parse operation succeeds. If the parse operation fails, result contains the default value of the underlying type of TEnum. Note that this value need not be a member of the TEnum enumeration. This parameter is passed uninitialized.