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 char Parse(
	string 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

s is null.


The length of s is not 1.

The following code example demonstrates Parse.

using System;

public class ParseSample {
	public static void Main() {
		Console.WriteLine(Char.Parse("A")); // Output: 'A'

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft