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
)
public static boolean IsSymbol (
	char c
)
public static function IsSymbol (
	c : char
) : boolean
Not applicable.

Parameters

c

A Unicode character.

Return Value

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"
	}
}

import System.*;

public class IsSymbolSample 
{
    public static void main(String[] args)
    {
        String str = "non-symbolic characters";
      
        Console.WriteLine(Char.IsSymbol('+'));        // Output: "True"
        Console.WriteLine(Char.IsSymbol(str, 8));    // Output: "False"
    } //main
} //IsSymbolSample 

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0

XNA Framework

Supported in: 1.0

Community Additions

ADD
Show:
© 2014 Microsoft