In C#, Char.IsSymbol returns true for Unicode symbol categories—currency signs, math symbols, modifiers, and other symbols.
Punctuation is a different category; use IsPunctuation for commas and periods.
This is a static member of System.Char. You call it with the type name, such as Char.IsSymbol(...) or char.IsSymbol(...). A char holds one 16-bit UTF-16 code unit.
Syntax
Pass the character to test.
C#
bool ok = Char.IsSymbol('$');
Call
What it does
Char.IsSymbol(c)
True if c is a symbol.
Char.IsSymbol(s, i)
Tests s[i].
Letters and digits return false.
Library declarations
C#
public static bool IsSymbol(char c);
public static bool IsSymbol(string s, int index);
Parameters
Parameter
Description
c
Character to test.
s, index
Optional string index overload.
Return Value
Return Value
Description
true
Symbol character.
false
Not a symbol.
C# Examples
Example 1 — Dollar Sign
Classify $ and a letter.
C#
using System;
class Program {
static void Main() {
Console.WriteLine(Char.IsSymbol('$'));
Console.WriteLine(Char.IsSymbol('A'));
}
}
Output
True
False
How It Works
Currency symbol. $ matches IsSymbol.
Letter A. Not a symbol.
True/False. Straightforward classification.
Common case. Money signs are typical symbols.
Example 2 — Plus Sign
Show that + is a math symbol.
C#
using System;
class Program {
static void Main() {
Console.WriteLine(Char.IsSymbol('+'));
Console.WriteLine(Char.IsPunctuation('+'));
}
}
Output
True
False
How It Works
Plus as symbol. IsSymbol returns true.
Not punctuation. IsPunctuation is false for +.
Category split. Unicode places + among symbols.
Filter design. Include IsSymbol if you want math signs.
Example 3 — List Symbols in Text
Print every symbol in a short string.
C#
using System;
class Program {
static void Main() {
string s = "A$B+C";
foreach (char ch in s) {
if (Char.IsSymbol(ch)) Console.Write(ch);
}
Console.WriteLine();
}
}
Output
$+
How It Works
Mixed string. Letters and symbols alternate.
Write symbols. Only $ and + print.
Letters skipped. A, B, C are ignored.
Compact output. Ends with a newline after the symbols.