Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Char::Parse Method (String^)

 

Converts the value of the specified string to its equivalent Unicode character.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public:
static wchar_t Parse(
	String^ s
)

Parameters

s
Type: System::String^

A string that contains a single character, or null.

Return Value

Type: System::Char

A Unicode character equivalent to the sole character in s.

Exception Condition
ArgumentNullException

s is null.

FormatException

The length of s is not 1.

The following code example demonstrates Parse.

using namespace System;
int main()
{
   Console::WriteLine( Char::Parse(  "A" ) ); // Output: 'A'
}

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft