Export (0) Print
Expand All

Char.IsSymbol Method (Char)

Indicates whether the specified Unicode character is categorized as a symbol character.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static bool IsSymbol(
	char c
)

Parameters

c
Type: System.Char
The Unicode character to evaluate.

Return Value

Type: System.Boolean
true if c is a symbol character; otherwise, false.

Valid symbols are members of the following categories in UnicodeCategory: MathSymbol, CurrencySymbol, ModifierSymbol, and OtherSymbol.

Symbols in the Unicode standard are a loosely defined set of characters that include the following:

  • Currency symbols.

  • Letterlike symbols, which include a set of mathematical alphanumeric symbols, as well as such symbols as ℅, №, and ™.

  • Number forms, such as subscripts and superscripts.

  • Mathematical operators and arrows.

  • Geometric symbols.

  • Technical symbols.

  • Braille patterns.

  • Dingbats.

The following code example demonstrates IsSymbol.


using System;

public class IsSymbolSample {
	public static void Main() {
		string str = "non-symbolic characters"; 

		Console.WriteLine(Char.IsSymbol('+'));		// Output: "True"
		Console.WriteLine(Char.IsSymbol(str, 8));	// Output: "False"
	}
}


.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft