C# Char IsAsciiLetter() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
Char

Definition

In C#, Char.IsAsciiLetter returns true for ASCII letters A–Z and a–z only.

Accented letters fail. These ASCII helpers are available in .NET 7 and later. On older runtimes, use range checks such as c >= '0' && c <= '9'.

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

Syntax

Pass a character to test for A–Z/a–z.

C#
bool ok = Char.IsAsciiLetter('Z');
CallWhat it does
Char.IsAsciiLetter(c)True for A–Z or a–z.

Digits return false.

Library declarations
C#
public static bool IsAsciiLetter(char c);

Parameters

ParameterDescription
cCharacter to test.

Return Value

Return ValueDescription
trueASCII letter.
falseNot an ASCII letter.

C# Examples

Example 1 — Z and é

Compare ASCII and non-ASCII letters.

C#
using System;

class Program {
    static void Main() {
        Console.WriteLine(Char.IsAsciiLetter('Z'));
        Console.WriteLine(Char.IsAsciiLetter('é'));
        Console.WriteLine(Char.IsLetter('é'));
    }
}

How It Works

  1. Z passes. Plain ASCII letter.
  2. é fails ASCII. Outside A–Z/a–z.
  3. IsLetter true. Unicode still sees a letter.
  4. Choose scope. ASCII vs full Unicode.

Example 2 — Upper and Lower

Show A and a both pass.

C#
using System;

class Program {
    static void Main() {
        Console.WriteLine(Char.IsAsciiLetter('A'));
        Console.WriteLine(Char.IsAsciiLetter('a'));
        Console.WriteLine(Char.IsAsciiLetter('1'));
    }
}

How It Works

  1. Upper A. Accepted.
  2. Lower a. Accepted.
  3. Digit fails. Not a letter.
  4. Both cases. No case restriction here.

Example 3 — Keep ASCII Letters

Strip non ASCII-letter characters.

C#
using System;

class Program {
    static void Main() {
        string raw = "Go#1";
        string keep = "";
        foreach (char ch in raw) {
            if (Char.IsAsciiLetter(ch)) keep += ch;
        }
        Console.WriteLine(keep);
    }
}

How It Works

  1. Mixed token. Letters, hash, digit.
  2. Letter filter. Only A–Z/a–z kept.
  3. Go remains. Symbols and digits dropped.
  4. Strict alphabet. Good for ASCII identifiers.

Frequently Asked Questions

No.
No—use IsAsciiLetterOrDigit.
.NET 7+.
IsAsciiLetterLower / IsAsciiLetterUpper.
IsLetter accepts many Unicode letters.

Next: IsAsciiLetterLower()

Return true for ASCII lowercase letters a–z. .NET 7+ with System.Char.

IsAsciiLetterLower() 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.

11 people found this page helpful