System::Char::TryParse method

Char::TryParse method

Tries to convert a string consisting of a single character into UTF-16 character. The function succeeds only when input string is not null and has length of exactly one character.

static bool System::Char::TryParse(const System::String &s, char_t &result)
ParameterTypeDescription
sconst System::String&String to convert
resultchar_t&The output variable that will contain the result of conversion if conversion succeeds

ReturnValue

True if conversion succeeded, otherwise - false

See Also