C# Char Parse() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Char

Definition

In C#, Char.Parse converts a string into a char. The string must contain exactly one character.

If the string is null, empty, or longer than one character, Parse throws. Prefer TryParse when input might be wrong.

This is a static member of System.Char. You call it with the type name, such as Char.Parse(...) or char.Parse(...). A char holds one 16-bit UTF-16 code unit.

Syntax

Pass a one-character string.

C#
char c = Char.Parse("A");
CallWhat it does
Char.Parse("A")Returns 'A'.

Surrogate pairs are two chars—Parse cannot turn an emoji string of length 2 into one char.

Library declarations
C#
public static char Parse(string s);

Parameters

ParameterDescription
sRequired. Must have Length == 1.

Return Value

Return ValueDescription
charThe single character from the string.

C# Examples

Example 1 — Parse a Letter

Convert "A" to char A.

C#
using System;

class Program {
    static void Main() {
        char c = Char.Parse("A");
        Console.WriteLine(c);
        Console.WriteLine(Char.IsLetter(c));
    }
}

How It Works

  1. Length one. "A" is valid input.
  2. Char result. Variable holds A.
  3. IsLetter true. Parsed value behaves like any char.
  4. Strict API. Wrong lengths throw.

Example 2 — Parse "7"

Turn a digit string into a char.

C#
using System;

class Program {
    static void Main() {
        char c = Char.Parse("7");
        Console.WriteLine(c);
        Console.WriteLine(Char.GetNumericValue(c));
    }
}

How It Works

  1. Digit string. One character "7".
  2. Parse to char. Still a character, not an int.
  3. Numeric value. GetNumericValue yields 7.
  4. Two steps. Parse then interpret.

Example 3 — Show Failure Path Idea

Demonstrate that long strings are invalid for Parse—use TryParse instead.

C#
using System;

class Program {
    static void Main() {
        string bad = "AB";
        bool ok = Char.TryParse(bad, out char c);
        Console.WriteLine("TryParse AB: " + ok);
        Console.WriteLine("Parse works for: " + Char.Parse("Z"));
    }
}

How It Works

  1. Too long. "AB" has length 2.
  2. TryParse false. No exception.
  3. Parse Z. Length-1 still works.
  4. Safer habit. Reach for TryParse on untrusted input.

Frequently Asked Questions

Exactly 1.
Parse throws; TryParse returns false.
Most emoji are length 2 (surrogate pair); Parse cannot return one char for them.
Throws.
TryParse.

Next: ToLower()

Convert a character to lowercase using culture rules with System.Char.

ToLower() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

13 people found this page helpful