Example 1 — Print TypeCode.Char
Call GetTypeCode on a letter and print it.
using System;
class Program {
static void Main() {
char c = 'A';
TypeCode tc = c.GetTypeCode();
Console.WriteLine(tc);
Console.WriteLine(tc == TypeCode.Char);
}
} How It Works
- Instance call. Any char exposes GetTypeCode.
- Enum name. Printing the TypeCode shows Char.
- Equality check. Compare against
TypeCode.Char. - Not classification. This does not say whether A is a letter—that is IsLetter.

