TryParse()

Char::TryParse(const System::String&, char_t&) 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)

Arguments

ParameterTypeDescription
sconst System::String&String to convert
resultchar_t&The output variable that will contain the result of conversion if conversion succeeds

Return Value

True if conversion succeeded, otherwise - false

See Also