Char.IsSymbol Char.IsSymbol Char.IsSymbol Char.IsSymbol Method

Definition

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

Overloads

IsSymbol(Char) IsSymbol(Char) IsSymbol(Char) IsSymbol(Char)

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

IsSymbol(String, Int32) IsSymbol(String, Int32) IsSymbol(String, Int32) IsSymbol(String, Int32)

Indicates whether the character at the specified position in a specified string is categorized as a symbol character.

Remarks

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 symbols such as ℅, №, and ™.

  • Number forms, such as subscripts and superscripts.

  • Mathematical operators and arrows.

  • Geometric symbols.

  • Technical symbols.

  • Braille patterns.

  • Dingbats.

IsSymbol(Char) IsSymbol(Char) IsSymbol(Char) IsSymbol(Char)

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

public:
 static bool IsSymbol(char c);
public static bool IsSymbol (char c);
static member IsSymbol : char -> bool
Public Shared Function IsSymbol (c As Char) As Boolean
Parameters
c
Char Char Char Char

The Unicode character to evaluate.

Returns

true if c is a symbol character; otherwise, false.

Examples

The following code example demonstrates IsSymbol.

using namespace System;
int main()
{
   String^ str =  "non-symbolic characters";
   Console::WriteLine( Char::IsSymbol( '+' ) ); // Output: "True"
   Console::WriteLine( Char::IsSymbol( str, 8 ) ); // Output: "False"
}

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

Module IsSymbolSample

    Sub Main()

        Dim str As String
        str = "non-symbolic characters"

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

    End Sub

End Module

Remarks

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 symbols such as ℅, №, and ™.

  • Number forms, such as subscripts and superscripts.

  • Mathematical operators and arrows.

  • Geometric symbols.

  • Technical symbols.

  • Braille patterns.

  • Dingbats.

See Also

IsSymbol(String, Int32) IsSymbol(String, Int32) IsSymbol(String, Int32) IsSymbol(String, Int32)

Indicates whether the character at the specified position in a specified string is categorized as a symbol character.

public:
 static bool IsSymbol(System::String ^ s, int index);
public static bool IsSymbol (string s, int index);
static member IsSymbol : string * int -> bool
Public Shared Function IsSymbol (s As String, index As Integer) As Boolean
Parameters
s
String String String String

A string.

index
Int32 Int32 Int32 Int32

The position of the character to evaluate in s.

Returns

true if the character at position index in s is a symbol character; otherwise, false.

Exceptions

Examples

The following code example demonstrates IsSymbol.

using namespace System;
int main()
{
   String^ str =  "non-symbolic characters";
   Console::WriteLine( Char::IsSymbol( '+' ) ); // Output: "True"
   Console::WriteLine( Char::IsSymbol( str, 8 ) ); // Output: "False"
}

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

Module IsSymbolSample

    Sub Main()

        Dim str As String
        str = "non-symbolic characters"

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

    End Sub

End Module

Remarks

Character positions in a string are indexed starting from zero.

Valid symbols are members of the following categories in System.Globalization.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 symbols such as ℅, №, and ™.

  • Number forms, such as subscripts and superscripts.

  • Mathematical operators and arrows.

  • Geometric symbols.

  • Technical symbols.

  • Braille patterns.

  • Dingbats.

See Also

Applies to