System::EnumParseHelper< E, G, Guard > Struct Template Reference

Static Public Member Functions

static E Parse (const String &str, bool ignoreCase=false)

Detailed Description

template<class E, class G, class Guard = void>
struct System::EnumParseHelper< E, G, Guard >

Helper class that provides functionality of converting a string representation of enum consnant into equivalent enum value.

Template Parameters
EThe type of the enum with which the class' methods operate
GSecond formal argument of System::Enum to use.
GuardFormal template argument to select parsing algorithm available.

Member Function Documentation

◆ Parse()

template<class E , class G , class Guard = void>
static E System::EnumParseHelper< E, G, Guard >::Parse ( const String str,
bool  ignoreCase = false 

Converts the specfied string into equivalent enum constant value.

strString that is interpreted as containing the name of enum constant
ignoreCaseSpecifies if the case should be ignored when interpreting the string
The enumeration constant whose name is specified in str
ArgumentExceptionIf the enum constant with name specifed in str was not found aboung the members of enum E.