TryParse()

Boolean::TryParse(const String&, bool&) method

Converts the specified string to a value of bool type.

static bool System::Boolean::TryParse(const String &value, bool &result)

Arguments

ParameterTypeDescription
valueconst String&The string to convert.
resultbool&The reference to a bool variable where the result of the conversion is put; the result is true if the specified string is equal to "True" and false if the specified string is equal to "False".

Return Value

True if the specified string is equal either to "True" or "False", otherwise - false.

See Also