xtd 0.2.0
Loading...
Searching...
No Matches

◆ try_parse() [2/2]

template<typename enum_t >
static bool xtd::enum_object< std::nullptr_t >::try_parse ( const xtd::string value,
bool  ignore_case,
enum_t &  result 
)
inlinestaticnoexcept

Converts the xtd::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.

Parameters
vaueThe xtd::string representation of the enumeration name or underlying value to convert.
ignore_casetrue to Ignore case; false to regard case.
resltWhen 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 ! be a member of the TEnum enumeration. This parameter is passed uninitialized.
Returns
true if the value parameter was converted successfully; otherwise, false.