C# Char Methods

About This Index
This page is the C# Char Methods index. Each row links to a full guide with syntax, parameters, return value, three examples, and FAQs.
Learn what a char is on /c-sharp/char. Use this page when you need a specific API such as IsDigit(), IsLetter(), or ToLowerInvariant().
A char is one UTF-16 code unit. A string is a sequence of chars. Use Char.Is* when you already hold a single character; use string methods when you work with whole text.
How to Call a Char Method
Most helpers are static on Char / char. Some members also exist on the value:
char c = 'A';
bool digit = Char.IsDigit(c); // static
bool letter = char.IsLetter(c); // same type, lowercase alias
char lower = Char.ToLowerInvariant(c);
string s = c.ToString(); // instance C# Char Methods Table
All method guides in this C# tutorial series (42 tutorials), grouped by purpose.
Comparison / identity
4 methodsCompare chars, test equality, get a hash code, or ask the TypeCode.
| Method | Description | Tutorial |
|---|---|---|
CompareTo() | Compare this char to another and return negative, zero, or positive. | Try it |
Equals() | Return true when two characters have the same UTF-16 value. | Try it |
GetHashCode() | Return a hash code for this character, useful in hash-based collections. | Try it |
GetTypeCode() | Return TypeCode.Char for this character value. | Try it |
Classification (Unicode)
13 methodsAsk what kind of character you have: letter, digit, space, punctuation, and more.
| Method | Description | Tutorial |
|---|---|---|
IsLetter() | Return true when the character is a Unicode letter. | Try it |
IsDigit() | Return true when the character is a Unicode decimal digit. | Try it |
IsLetterOrDigit() | Return true when the character is a letter or a decimal digit. | Try it |
IsLower() | Return true when the character is a lowercase letter. | Try it |
IsUpper() | Return true when the character is an uppercase letter. | Try it |
IsNumber() | Return true when the character is any Unicode numeric character. | Try it |
IsWhiteSpace() | Return true when the character is Unicode whitespace. | Try it |
IsControl() | Return true when the character is a Unicode control character. | Try it |
IsPunctuation() | Return true when the character is Unicode punctuation. | Try it |
IsSeparator() | Return true when the character is a Unicode separator. | Try it |
IsSymbol() | Return true when the character is a Unicode symbol. | Try it |
GetUnicodeCategory() | Return the UnicodeCategory enum value for a character. | Try it |
GetNumericValue() | Return the numeric value of a digit character, or -1 when it has none. | Try it |
ASCII helpers
9 methodsFast checks limited to the ASCII range (0–127). Available in .NET 7 and later.
| Method | Description | Tutorial |
|---|---|---|
IsAscii() | Return true when the character is in the ASCII range (0–127). .NET 7+. | Try it |
IsAsciiDigit() | Return true for ASCII digits 0–9 only. .NET 7+. | Try it |
IsAsciiHexDigit() | Return true for ASCII hex digits 0–9, A–F, a–f. .NET 7+. | Try it |
IsAsciiHexDigitLower() | Return true for ASCII hex digits 0–9 and a–f (lowercase). .NET 7+. | Try it |
IsAsciiHexDigitUpper() | Return true for ASCII hex digits 0–9 and A–F (uppercase). .NET 7+. | Try it |
IsAsciiLetter() | Return true for ASCII letters A–Z or a–z. .NET 7+. | Try it |
IsAsciiLetterLower() | Return true for ASCII lowercase letters a–z. .NET 7+. | Try it |
IsAsciiLetterOrDigit() | Return true for ASCII A–Z, a–z, or 0–9. .NET 7+. | Try it |
IsAsciiLetterUpper() | Return true for ASCII uppercase letters A–Z. .NET 7+. | Try it |
Range
1 methodTest whether a character falls between two inclusive bounds (.NET 7+).
| Method | Description | Tutorial |
|---|---|---|
IsBetween() | Return true when a character lies inclusively between two bounds. .NET 7+. | Try it |
Surrogates / UTF-32
6 methodsHandle Unicode beyond the Basic Multilingual Plane with surrogate pairs and UTF-32 codes.
| Method | Description | Tutorial |
|---|---|---|
IsSurrogate() | Return true when the character is a high or low UTF-16 surrogate. | Try it |
IsHighSurrogate() | Return true when the character is a UTF-16 high surrogate. | Try it |
IsLowSurrogate() | Return true when the character is a UTF-16 low surrogate. | Try it |
IsSurrogatePair() | Return true when two characters form a valid UTF-16 surrogate pair. | Try it |
ConvertFromUtf32() | Convert a Unicode code point to a string of one or two UTF-16 chars. | Try it |
ConvertToUtf32() | Convert a char or surrogate pair to a UTF-32 code point. | Try it |
Case conversion
6 methodsChange letter case with culture rules, invariant culture, or ordinal mapping.
| Method | Description | Tutorial |
|---|---|---|
ToLower() | Convert a character to lowercase using culture rules. | Try it |
ToLowerInvariant() | Convert a character to lowercase using the invariant culture. | Try it |
ToLowerOrdinal() | Convert a character to lowercase using ordinal (simple) mapping. .NET 7+. | Try it |
ToUpper() | Convert a character to uppercase using culture rules. | Try it |
ToUpperInvariant() | Convert a character to uppercase using the invariant culture. | Try it |
ToUpperOrdinal() | Convert a character to uppercase using ordinal mapping. .NET 7+. | Try it |
Parse / string
3 methodsTurn a one-character string into a char, try safely, or convert a char to a string.
| Method | Description | Tutorial |
|---|---|---|
Parse() | Convert a length-1 string to a char, or throw if invalid. | Try it |
TryParse() | Try to convert a length-1 string to a char without throwing. | Try it |
ToString() | Convert a character to a one-character string. | Try it |
Frequently Asked Questions
Start with IsDigit()
Test whether a character is a decimal digit—one of the most common Char checks.
12 people found this page helpful
