C# Char Parse
Description
Char Parse
converts the value of the specified string
to its equivalent Unicode character.
Syntax
Char.Parse
has the following syntax.
public static char Parse(
string s
)
Parameters
Char.Parse
has the following parameters.
s
- A string that contains a single character, or null.
Returns
Char.Parse
method returns A Unicode character equivalent to the sole character in s.
Example
The following code example demonstrates Parse.
/*w w w .j a v a2 s . c o m*/
using System;
public class ParseSample {
public static void Main() {
Console.WriteLine(Char.Parse("A")); // Output: 'A'
}
}
The code above generates the following result.