Char Struct

Definition

Represents a character as a UTF-16 code unit.

public value class char : IComparable, IComparable<char>, IConvertible, IEquatable<char>
public value class char : IComparable, IComparable<char>, IConvertible, IEquatable<char>, ISpanFormattable
public value class char : IComparable<char>, IConvertible, IEquatable<char>, IParsable<char>, ISpanParsable<char>, System::Numerics::IAdditionOperators<char, char, char>, System::Numerics::IAdditiveIdentity<char, char>, System::Numerics::IBinaryInteger<char>, System::Numerics::IBinaryNumber<char>, System::Numerics::IBitwiseOperators<char, char, char>, System::Numerics::IComparisonOperators<char, char, bool>, System::Numerics::IDecrementOperators<char>, System::Numerics::IDivisionOperators<char, char, char>, System::Numerics::IEqualityOperators<char, char, bool>, System::Numerics::IIncrementOperators<char>, System::Numerics::IMinMaxValue<char>, System::Numerics::IModulusOperators<char, char, char>, System::Numerics::IMultiplicativeIdentity<char, char>, System::Numerics::IMultiplyOperators<char, char, char>, System::Numerics::INumber<char>, System::Numerics::INumberBase<char>, System::Numerics::IShiftOperators<char, int, char>, System::Numerics::ISubtractionOperators<char, char, char>, System::Numerics::IUnaryNegationOperators<char, char>, System::Numerics::IUnaryPlusOperators<char, char>, System::Numerics::IUnsignedNumber<char>
public value class char : IComparable<char>, IConvertible, IEquatable<char>, IParsable<char>, ISpanParsable<char>, IUtf8SpanParsable<char>, System::Numerics::IAdditionOperators<char, char, char>, System::Numerics::IAdditiveIdentity<char, char>, System::Numerics::IBinaryInteger<char>, System::Numerics::IBinaryNumber<char>, System::Numerics::IBitwiseOperators<char, char, char>, System::Numerics::IComparisonOperators<char, char, bool>, System::Numerics::IDecrementOperators<char>, System::Numerics::IDivisionOperators<char, char, char>, System::Numerics::IEqualityOperators<char, char, bool>, System::Numerics::IIncrementOperators<char>, System::Numerics::IMinMaxValue<char>, System::Numerics::IModulusOperators<char, char, char>, System::Numerics::IMultiplicativeIdentity<char, char>, System::Numerics::IMultiplyOperators<char, char, char>, System::Numerics::INumber<char>, System::Numerics::INumberBase<char>, System::Numerics::IShiftOperators<char, int, char>, System::Numerics::ISubtractionOperators<char, char, char>, System::Numerics::IUnaryNegationOperators<char, char>, System::Numerics::IUnaryPlusOperators<char, char>, System::Numerics::IUnsignedNumber<char>
public value class char : IComparable, IConvertible
public value class char : IComparable, IComparable<char>, IEquatable<char>
public struct Char : IComparable, IComparable<char>, IConvertible, IEquatable<char>
public readonly struct Char : IComparable, IComparable<char>, IConvertible, IEquatable<char>
public readonly struct Char : IComparable, IComparable<char>, IConvertible, IEquatable<char>, ISpanFormattable
public readonly struct Char : IComparable<char>, IConvertible, IEquatable<char>, IParsable<char>, ISpanParsable<char>, System.Numerics.IAdditionOperators<char,char,char>, System.Numerics.IAdditiveIdentity<char,char>, System.Numerics.IBinaryInteger<char>, System.Numerics.IBinaryNumber<char>, System.Numerics.IBitwiseOperators<char,char,char>, System.Numerics.IComparisonOperators<char,char,bool>, System.Numerics.IDecrementOperators<char>, System.Numerics.IDivisionOperators<char,char,char>, System.Numerics.IEqualityOperators<char,char,bool>, System.Numerics.IIncrementOperators<char>, System.Numerics.IMinMaxValue<char>, System.Numerics.IModulusOperators<char,char,char>, System.Numerics.IMultiplicativeIdentity<char,char>, System.Numerics.IMultiplyOperators<char,char,char>, System.Numerics.INumber<char>, System.Numerics.INumberBase<char>, System.Numerics.IShiftOperators<char,int,char>, System.Numerics.ISubtractionOperators<char,char,char>, System.Numerics.IUnaryNegationOperators<char,char>, System.Numerics.IUnaryPlusOperators<char,char>, System.Numerics.IUnsignedNumber<char>
public readonly struct Char : IComparable<char>, IConvertible, IEquatable<char>, IParsable<char>, ISpanParsable<char>, IUtf8SpanParsable<char>, System.Numerics.IAdditionOperators<char,char,char>, System.Numerics.IAdditiveIdentity<char,char>, System.Numerics.IBinaryInteger<char>, System.Numerics.IBinaryNumber<char>, System.Numerics.IBitwiseOperators<char,char,char>, System.Numerics.IComparisonOperators<char,char,bool>, System.Numerics.IDecrementOperators<char>, System.Numerics.IDivisionOperators<char,char,char>, System.Numerics.IEqualityOperators<char,char,bool>, System.Numerics.IIncrementOperators<char>, System.Numerics.IMinMaxValue<char>, System.Numerics.IModulusOperators<char,char,char>, System.Numerics.IMultiplicativeIdentity<char,char>, System.Numerics.IMultiplyOperators<char,char,char>, System.Numerics.INumber<char>, System.Numerics.INumberBase<char>, System.Numerics.IShiftOperators<char,int,char>, System.Numerics.ISubtractionOperators<char,char,char>, System.Numerics.IUnaryNegationOperators<char,char>, System.Numerics.IUnaryPlusOperators<char,char>, System.Numerics.IUnsignedNumber<char>
[System.Serializable]
public struct Char : IComparable, IConvertible
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct Char : IComparable, IComparable<char>, IConvertible, IEquatable<char>
public struct Char : IComparable, IComparable<char>, IEquatable<char>
type char = struct
    interface IConvertible
type char = struct
    interface IConvertible
    interface ISpanFormattable
    interface IFormattable
type char = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<char>
    interface ISpanFormattable
    interface ISpanParsable<char>
    interface IAdditionOperators<char, char, char>
    interface IAdditiveIdentity<char, char>
    interface IBinaryInteger<char>
    interface IBinaryNumber<char>
    interface IBitwiseOperators<char, char, char>
    interface IComparisonOperators<char, char, bool>
    interface IEqualityOperators<char, char, bool>
    interface IDecrementOperators<char>
    interface IDivisionOperators<char, char, char>
    interface IIncrementOperators<char>
    interface IModulusOperators<char, char, char>
    interface IMultiplicativeIdentity<char, char>
    interface IMultiplyOperators<char, char, char>
    interface INumber<char>
    interface INumberBase<char>
    interface ISubtractionOperators<char, char, char>
    interface IUnaryNegationOperators<char, char>
    interface IUnaryPlusOperators<char, char>
    interface IShiftOperators<char, int, char>
    interface IMinMaxValue<char>
    interface IUnsignedNumber<char>
type char = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<char>
    interface ISpanFormattable
    interface ISpanParsable<char>
    interface IAdditionOperators<char, char, char>
    interface IAdditiveIdentity<char, char>
    interface IBinaryInteger<char>
    interface IBinaryNumber<char>
    interface IBitwiseOperators<char, char, char>
    interface IComparisonOperators<char, char, bool>
    interface IEqualityOperators<char, char, bool>
    interface IDecrementOperators<char>
    interface IDivisionOperators<char, char, char>
    interface IIncrementOperators<char>
    interface IModulusOperators<char, char, char>
    interface IMultiplicativeIdentity<char, char>
    interface IMultiplyOperators<char, char, char>
    interface INumber<char>
    interface INumberBase<char>
    interface ISubtractionOperators<char, char, char>
    interface IUnaryNegationOperators<char, char>
    interface IUnaryPlusOperators<char, char>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<char>
    interface IShiftOperators<char, int, char>
    interface IMinMaxValue<char>
    interface IUnsignedNumber<char>
type char = struct
    interface IConvertible
    interface IFormattable
    interface IParsable<char>
    interface ISpanFormattable
    interface ISpanParsable<char>
    interface IUtf8SpanFormattable
    interface IUtf8SpanParsable<char>
    interface IAdditionOperators<char, char, char>
    interface IAdditiveIdentity<char, char>
    interface IBinaryInteger<char>
    interface IBinaryNumber<char>
    interface IBitwiseOperators<char, char, char>
    interface IComparisonOperators<char, char, bool>
    interface IEqualityOperators<char, char, bool>
    interface IDecrementOperators<char>
    interface IDivisionOperators<char, char, char>
    interface IIncrementOperators<char>
    interface IModulusOperators<char, char, char>
    interface IMultiplicativeIdentity<char, char>
    interface IMultiplyOperators<char, char, char>
    interface INumber<char>
    interface INumberBase<char>
    interface ISubtractionOperators<char, char, char>
    interface IUnaryNegationOperators<char, char>
    interface IUnaryPlusOperators<char, char>
    interface IShiftOperators<char, int, char>
    interface IMinMaxValue<char>
    interface IUnsignedNumber<char>
[<System.Serializable>]
type char = struct
    interface IConvertible
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type char = struct
    interface IConvertible
type char = struct
Public Structure Char
Implements IComparable, IComparable(Of Char), IConvertible, IEquatable(Of Char)
Public Structure Char
Implements IComparable, IComparable(Of Char), IConvertible, IEquatable(Of Char), ISpanFormattable
Public Structure Char
Implements IAdditionOperators(Of Char, Char, Char), IAdditiveIdentity(Of Char, Char), IBinaryInteger(Of Char), IBinaryNumber(Of Char), IBitwiseOperators(Of Char, Char, Char), IComparable(Of Char), IComparisonOperators(Of Char, Char, Boolean), IConvertible, IDecrementOperators(Of Char), IDivisionOperators(Of Char, Char, Char), IEqualityOperators(Of Char, Char, Boolean), IEquatable(Of Char), IIncrementOperators(Of Char), IMinMaxValue(Of Char), IModulusOperators(Of Char, Char, Char), IMultiplicativeIdentity(Of Char, Char), IMultiplyOperators(Of Char, Char, Char), INumber(Of Char), INumberBase(Of Char), IParsable(Of Char), IShiftOperators(Of Char, Integer, Char), ISpanParsable(Of Char), ISubtractionOperators(Of Char, Char, Char), IUnaryNegationOperators(Of Char, Char), IUnaryPlusOperators(Of Char, Char), IUnsignedNumber(Of Char)
Public Structure Char
Implements IAdditionOperators(Of Char, Char, Char), IAdditiveIdentity(Of Char, Char), IBinaryInteger(Of Char), IBinaryNumber(Of Char), IBitwiseOperators(Of Char, Char, Char), IComparable(Of Char), IComparisonOperators(Of Char, Char, Boolean), IConvertible, IDecrementOperators(Of Char), IDivisionOperators(Of Char, Char, Char), IEqualityOperators(Of Char, Char, Boolean), IEquatable(Of Char), IIncrementOperators(Of Char), IMinMaxValue(Of Char), IModulusOperators(Of Char, Char, Char), IMultiplicativeIdentity(Of Char, Char), IMultiplyOperators(Of Char, Char, Char), INumber(Of Char), INumberBase(Of Char), IParsable(Of Char), IShiftOperators(Of Char, Integer, Char), ISpanParsable(Of Char), ISubtractionOperators(Of Char, Char, Char), IUnaryNegationOperators(Of Char, Char), IUnaryPlusOperators(Of Char, Char), IUnsignedNumber(Of Char), IUtf8SpanParsable(Of Char)
Public Structure Char
Implements IComparable, IConvertible
Public Structure Char
Implements IComparable, IComparable(Of Char), IEquatable(Of Char)
Inheritance
Attributes
Implements
IComparable IComparable<Char> IConvertible IEquatable<Char> IFormattable ISpanFormattable IComparable<TSelf> IEquatable<TSelf> IParsable<Char> IParsable<TSelf> ISpanParsable<Char> ISpanParsable<TSelf> IAdditionOperators<Char,Char,Char> IAdditionOperators<TSelf,TSelf,TSelf> IAdditiveIdentity<Char,Char> IAdditiveIdentity<TSelf,TSelf> IBinaryInteger<Char> IBinaryNumber<Char> IBinaryNumber<TSelf> IBitwiseOperators<Char,Char,Char> IBitwiseOperators<TSelf,TSelf,TSelf> IComparisonOperators<Char,Char,Boolean> IComparisonOperators<TSelf,TSelf,Boolean> IDecrementOperators<Char> IDecrementOperators<TSelf> IDivisionOperators<Char,Char,Char> IDivisionOperators<TSelf,TSelf,TSelf> IEqualityOperators<Char,Char,Boolean> IEqualityOperators<TSelf,TOther,TResult> IEqualityOperators<TSelf,TSelf,Boolean> IIncrementOperators<Char> IIncrementOperators<TSelf> IMinMaxValue<Char> IModulusOperators<Char,Char,Char> IModulusOperators<TSelf,TSelf,TSelf> IMultiplicativeIdentity<Char,Char> IMultiplicativeIdentity<TSelf,TSelf> IMultiplyOperators<Char,Char,Char> IMultiplyOperators<TSelf,TSelf,TSelf> INumber<Char> INumber<TSelf> INumberBase<Char> INumberBase<TSelf> IShiftOperators<Char,Int32,Char> IShiftOperators<TSelf,Int32,TSelf> ISubtractionOperators<Char,Char,Char> ISubtractionOperators<TSelf,TSelf,TSelf> IUnaryNegationOperators<Char,Char> IUnaryNegationOperators<TSelf,TSelf> IUnaryPlusOperators<Char,Char> IUnaryPlusOperators<TSelf,TSelf> IUnsignedNumber<Char> IUtf8SpanFormattable IUtf8SpanParsable<Char> IUtf8SpanParsable<TSelf>

Examples

The following code example demonstrates some of the methods in Char.

using namespace System;
int main()
{
   char chA = 'A';
   char ch1 = '1';
   String^ str =  "test string";
   Console::WriteLine( chA.CompareTo( 'B' ) ); // Output: "-1" (meaning 'A' is 1 less than 'B')
   Console::WriteLine( chA.Equals( 'A' ) ); // Output: "True"
   Console::WriteLine( Char::GetNumericValue( ch1 ) ); // Output: "1"
   Console::WriteLine( Char::IsControl( '\t' ) ); // Output: "True"
   Console::WriteLine( Char::IsDigit( ch1 ) ); // Output: "True"
   Console::WriteLine( Char::IsLetter( ',' ) ); // Output: "False"
   Console::WriteLine( Char::IsLower( 'u' ) ); // Output: "True"
   Console::WriteLine( Char::IsNumber( ch1 ) ); // Output: "True"
   Console::WriteLine( Char::IsPunctuation( '.' ) ); // Output: "True"
   Console::WriteLine( Char::IsSeparator( str, 4 ) ); // Output: "True"
   Console::WriteLine( Char::IsSymbol( '+' ) ); // Output: "True"
   Console::WriteLine( Char::IsWhiteSpace( str, 4 ) ); // Output: "True"
   Console::WriteLine( Char::Parse(  "S" ) ); // Output: "S"
   Console::WriteLine( Char::ToLower( 'M' ) ); // Output: "m"
   Console::WriteLine( 'x' ); // Output: "x"
}
using System;

public class CharStructureSample
{
    public static void Main()
    {
        char chA = 'A';
        char ch1 = '1';
        string str = "test string";

        Console.WriteLine(chA.CompareTo('B'));          //-----------  Output: "-1" (meaning 'A' is 1 less than 'B')
        Console.WriteLine(chA.Equals('A'));             //-----------  Output: "True"
        Console.WriteLine(Char.GetNumericValue(ch1));   //-----------  Output: "1"
        Console.WriteLine(Char.IsControl('\t'));        //-----------  Output: "True"
        Console.WriteLine(Char.IsDigit(ch1));           //-----------  Output: "True"
        Console.WriteLine(Char.IsLetter(','));          //-----------  Output: "False"
        Console.WriteLine(Char.IsLower('u'));           //-----------  Output: "True"
        Console.WriteLine(Char.IsNumber(ch1));          //-----------  Output: "True"
        Console.WriteLine(Char.IsPunctuation('.'));     //-----------  Output: "True"
        Console.WriteLine(Char.IsSeparator(str, 4));    //-----------  Output: "True"
        Console.WriteLine(Char.IsSymbol('+'));          //-----------  Output: "True"
        Console.WriteLine(Char.IsWhiteSpace(str, 4));   //-----------  Output: "True"
        Console.WriteLine(Char.Parse("S"));             //-----------  Output: "S"
        Console.WriteLine(Char.ToLower('M'));           //-----------  Output: "m"
        Console.WriteLine('x'.ToString());              //-----------  Output: "x"
    }
}
open System

let chA = 'A'
let ch1 = '1'
let str = "test string"

printfn $"{chA.CompareTo 'B'}"          //-----------  Output: "-1" (meaning 'A' is 1 less than 'B')
printfn $"{chA.Equals 'A'}"             //-----------  Output: "True"
printfn $"{Char.GetNumericValue ch1}"   //-----------  Output: "1"
printfn $"{Char.IsControl '\t'}"        //-----------  Output: "True"
printfn $"{Char.IsDigit ch1}"           //-----------  Output: "True"
printfn $"{Char.IsLetter ','}"          //-----------  Output: "False"
printfn $"{Char.IsLower 'u'}"           //-----------  Output: "True"
printfn $"{Char.IsNumber ch1}"          //-----------  Output: "True"
printfn $"{Char.IsPunctuation '.'}"     //-----------  Output: "True"
printfn $"{Char.IsSeparator(str, 4)}"   //-----------  Output: "True"
printfn $"{Char.IsSymbol '+'}"          //-----------  Output: "True"
printfn $"{Char.IsWhiteSpace(str, 4)}"  //-----------  Output: "True"
printfn $"""{Char.Parse "S"}"""         //-----------  Output: "S"
printfn $"{Char.ToLower 'M'}"           //-----------  Output: "m"
printfn $"{'x'}"                        //-----------  Output: "x"
Module CharStructure

    Public Sub Main()

        Dim chA As Char
        chA = "A"c
        Dim ch1 As Char
        ch1 = "1"c
        Dim str As String
        str = "test string"

        Console.WriteLine(chA.CompareTo("B"c))          ' Output: "-1" (meaning 'A' is 1 less than 'B')
        Console.WriteLine(chA.Equals("A"c))             ' Output: "True"
        Console.WriteLine(Char.GetNumericValue(ch1))    ' Output: "1"
        Console.WriteLine(Char.IsControl(Chr(9)))       ' Output: "True"
        Console.WriteLine(Char.IsDigit(ch1))            ' Output: "True"
        Console.WriteLine(Char.IsLetter(","c))          ' Output: "False"
        Console.WriteLine(Char.IsLower("u"c))           ' Output: "True"
        Console.WriteLine(Char.IsNumber(ch1))           ' Output: "True"
        Console.WriteLine(Char.IsPunctuation("."c))     ' Output: "True"
        Console.WriteLine(Char.IsSeparator(str, 4))     ' Output: "True"
        Console.WriteLine(Char.IsSymbol("+"c))          ' Output: "True"
        Console.WriteLine(Char.IsWhiteSpace(str, 4))    ' Output: "True"
        Console.WriteLine(Char.Parse("S"))              ' Output: "S"
        Console.WriteLine(Char.ToLower("M"c))           ' Output: "m"
        Console.WriteLine("x"c.ToString())              ' Output: "x"

    End Sub

End Module

Remarks

For more information about this API, see Supplemental API remarks for Char.

Fields

MaxValue

Represents the largest possible value of a Char. This field is constant.

MinValue

Represents the smallest possible value of a Char. This field is constant.

Methods

CompareTo(Char)

Compares this instance to a specified Char object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Char object.

CompareTo(Object)

Compares this instance to a specified object and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified Object.

ConvertFromUtf32(Int32)

Converts the specified Unicode code point into a UTF-16 encoded string.

ConvertToUtf32(Char, Char)

Converts the value of a UTF-16 encoded surrogate pair into a Unicode code point.

ConvertToUtf32(String, Int32)

Converts the value of a UTF-16 encoded character or surrogate pair at a specified position in a string into a Unicode code point.

Equals(Char)

Returns a value that indicates whether this instance is equal to the specified Char object.

Equals(Object)

Returns a value that indicates whether this instance is equal to a specified object.

GetHashCode()

Returns the hash code for this instance.

GetNumericValue(Char)

Converts the specified numeric Unicode character to a double-precision floating point number.

GetNumericValue(String, Int32)

Converts the numeric Unicode character at the specified position in a specified string to a double-precision floating point number.

GetTypeCode()

Returns the TypeCode for value type Char.

GetUnicodeCategory(Char)

Categorizes a specified Unicode character into a group identified by one of the UnicodeCategory values.

GetUnicodeCategory(String, Int32)

Categorizes the character at the specified position in a specified string into a group identified by one of the UnicodeCategory values.

IsAscii(Char)

Returns true if c is an ASCII character ([ U+0000..U+007F ]).

IsAsciiDigit(Char)

Indicates whether a character is categorized as an ASCII digit.

IsAsciiHexDigit(Char)

Indicates whether a character is categorized as an ASCII hexademical digit.

IsAsciiHexDigitLower(Char)

Indicates whether a character is categorized as an ASCII lower-case hexademical digit.

IsAsciiHexDigitUpper(Char)

Indicates whether a character is categorized as an ASCII upper-case hexademical digit.

IsAsciiLetter(Char)

Indicates whether a character is categorized as an ASCII letter.

IsAsciiLetterLower(Char)

Indicates whether a character is categorized as a lowercase ASCII letter.

IsAsciiLetterOrDigit(Char)

Indicates whether a character is categorized as an ASCII letter or digit.

IsAsciiLetterUpper(Char)

Indicates whether a character is categorized as an uppercase ASCII letter.

IsBetween(Char, Char, Char)

Indicates whether a character is within the specified inclusive range.

IsControl(Char)

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

IsControl(String, Int32)

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

IsDigit(Char)

Indicates whether the specified Unicode character is categorized as a decimal digit.

IsDigit(String, Int32)

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

IsHighSurrogate(Char)

Indicates whether the specified Char object is a high surrogate.

IsHighSurrogate(String, Int32)

Indicates whether the Char object at the specified position in a string is a high surrogate.

IsLetter(Char)

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

IsLetter(String, Int32)

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

IsLetterOrDigit(Char)

Indicates whether the specified Unicode character is categorized as a letter or a decimal digit.

IsLetterOrDigit(String, Int32)

Indicates whether the character at the specified position in a specified string is categorized as a letter or a decimal digit.

IsLower(Char)

Indicates whether the specified Unicode character is categorized as a lowercase letter.

IsLower(String, Int32)

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

IsLowSurrogate(Char)

Indicates whether the specified Char object is a low surrogate.

IsLowSurrogate(String, Int32)

Indicates whether the Char object at the specified position in a string is a low surrogate.

IsNumber(Char)

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

IsNumber(String, Int32)

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

IsPunctuation(Char)

Indicates whether the specified Unicode character is categorized as a punctuation mark.

IsPunctuation(String, Int32)

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

IsSeparator(Char)

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

IsSeparator(String, Int32)

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

IsSurrogate(Char)

Indicates whether the specified character has a surrogate code unit.

IsSurrogate(String, Int32)

Indicates whether the character at the specified position in a specified string has a surrogate code unit.

IsSurrogatePair(Char, Char)

Indicates whether the two specified Char objects form a surrogate pair.

IsSurrogatePair(String, Int32)

Indicates whether two adjacent Char objects at a specified position in a string form a surrogate pair.

IsSymbol(Char)

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

IsSymbol(String, Int32)

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

IsUpper(Char)

Indicates whether the specified Unicode character is categorized as an uppercase letter.

IsUpper(String, Int32)

Indicates whether the character at the specified position in a specified string is categorized as an uppercase letter.

IsWhiteSpace(Char)

Indicates whether the specified Unicode character is categorized as white space.

IsWhiteSpace(String, Int32)

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

Parse(String)

Converts the value of the specified string to its equivalent Unicode character.

ToLower(Char)

Converts the value of a Unicode character to its lowercase equivalent.

ToLower(Char, CultureInfo)

Converts the value of a specified Unicode character to its lowercase equivalent using specified culture-specific formatting information.

ToLowerInvariant(Char)

Converts the value of a Unicode character to its lowercase equivalent using the casing rules of the invariant culture.

ToString()

Converts the value of this instance to its equivalent string representation.

ToString(Char)

Converts the specified Unicode character to its equivalent string representation.

ToString(IFormatProvider)

Converts the value of this instance to its equivalent string representation using the specified culture-specific format information.

ToUpper(Char)

Converts the value of a Unicode character to its uppercase equivalent.

ToUpper(Char, CultureInfo)

Converts the value of a specified Unicode character to its uppercase equivalent using specified culture-specific formatting information.

ToUpperInvariant(Char)

Converts the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture.

TryParse(String, Char)

Converts the value of the specified string to its equivalent Unicode character. A return code indicates whether the conversion succeeded or failed.

Explicit Interface Implementations

IAdditionOperators<Char,Char,Char>.Addition(Char, Char)

Adds two values together to compute their sum.

IAdditionOperators<Char,Char,Char>.CheckedAddition(Char, Char)

Adds two values together to compute their sum.

IAdditiveIdentity<Char,Char>.AdditiveIdentity

Gets the additive identity of the current type.

IBinaryInteger<Char>.GetByteCount()

Gets the number of bytes that will be written as part of TryWriteLittleEndian(Span<Byte>, Int32).

IBinaryInteger<Char>.GetShortestBitLength()

Gets the length, in bits, of the shortest two's complement representation of the current value.

IBinaryInteger<Char>.LeadingZeroCount(Char)

Computes the number of leading zero bits in a value.

IBinaryInteger<Char>.PopCount(Char)

Computes the number of bits that are set in a value.

IBinaryInteger<Char>.RotateLeft(Char, Int32)

Rotates a value left by a given amount.

IBinaryInteger<Char>.RotateRight(Char, Int32)

Rotates a value right by a given amount.

IBinaryInteger<Char>.TrailingZeroCount(Char)

Computes the number of trailing zero bits in a value.

IBinaryInteger<Char>.TryReadBigEndian(ReadOnlySpan<Byte>, Boolean, Char)
IBinaryInteger<Char>.TryReadLittleEndian(ReadOnlySpan<Byte>, Boolean, Char)
IBinaryInteger<Char>.TryWriteBigEndian(Span<Byte>, Int32)

Tries to write the current value, in big-endian format, to a given span.

IBinaryInteger<Char>.TryWriteLittleEndian(Span<Byte>, Int32)

Tries to write the current value, in little-endian format, to a given span.

IBinaryNumber<Char>.AllBitsSet

Gets an instance of the binary type in which all bits are set.

IBinaryNumber<Char>.IsPow2(Char)

Determines if a value is a power of two.

IBinaryNumber<Char>.Log2(Char)

Computes the log2 of a value.

IBitwiseOperators<Char,Char,Char>.BitwiseAnd(Char, Char)

Computes the bitwise-and of two values.

IBitwiseOperators<Char,Char,Char>.BitwiseOr(Char, Char)

Computes the bitwise-or of two values.

IBitwiseOperators<Char,Char,Char>.ExclusiveOr(Char, Char)

Computes the exclusive-or of two values.

IBitwiseOperators<Char,Char,Char>.OnesComplement(Char)

Computes the ones-complement representation of a given value.

IComparable.CompareTo(Object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

IComparisonOperators<Char,Char,Boolean>.GreaterThan(Char, Char)

Compares two values to determine which is greater.

IComparisonOperators<Char,Char,Boolean>.GreaterThanOrEqual(Char, Char)

Compares two values to determine which is greater or equal.

IComparisonOperators<Char,Char,Boolean>.LessThan(Char, Char)

Compares two values to determine which is less.

IComparisonOperators<Char,Char,Boolean>.LessThanOrEqual(Char, Char)

Compares two values to determine which is less or equal.

IConvertible.GetTypeCode()

Returns the TypeCode for this instance.

IConvertible.ToBoolean(IFormatProvider)

Note This conversion is not supported. Attempting to do so throws an InvalidCastException.

IConvertible.ToByte(IFormatProvider)

For a description of this member, see ToByte(IFormatProvider).

IConvertible.ToChar(IFormatProvider)

For a description of this member, see ToChar(IFormatProvider).

IConvertible.ToDateTime(IFormatProvider)

Note This conversion is not supported. Attempting to do so throws an InvalidCastException.

IConvertible.ToDecimal(IFormatProvider)

Note This conversion is not supported. Attempting to do so throws an InvalidCastException.

IConvertible.ToDouble(IFormatProvider)

Note This conversion is not supported. Attempting to do so throws an InvalidCastException.

IConvertible.ToInt16(IFormatProvider)

For a description of this member, see ToInt16(IFormatProvider).

IConvertible.ToInt32(IFormatProvider)

For a description of this member, see ToInt32(IFormatProvider).

IConvertible.ToInt64(IFormatProvider)

For a description of this member, see ToInt64(IFormatProvider).

IConvertible.ToSByte(IFormatProvider)

For a description of this member, see ToSByte(IFormatProvider).

IConvertible.ToSingle(IFormatProvider)

Note This conversion is not supported. Attempting to do so throws an InvalidCastException.

IConvertible.ToString(IFormatProvider)

Converts the value of this instance to an equivalent string, using the specified culture-specific formatting information.

IConvertible.ToType(Type, IFormatProvider)

For a description of this member, see ToType(Type, IFormatProvider).

IConvertible.ToUInt16(IFormatProvider)

For a description of this member, see ToUInt16(IFormatProvider).

IConvertible.ToUInt32(IFormatProvider)

For a description of this member, see ToUInt32(IFormatProvider).

IConvertible.ToUInt64(IFormatProvider)

For a description of this member, see ToUInt64(IFormatProvider).

IDecrementOperators<Char>.CheckedDecrement(Char)

Decrements a value.

IDecrementOperators<Char>.Decrement(Char)

Decrements a value.

IDivisionOperators<Char,Char,Char>.Division(Char, Char)

Divides one value by another to compute their quotient.

IEqualityOperators<Char,Char,Boolean>.Equality(Char, Char)

Compares two values to determine equality.

IEqualityOperators<Char,Char,Boolean>.Inequality(Char, Char)

Compares two values to determine inequality.

IFormattable.ToString(String, IFormatProvider)

Formats the value of the current instance using the specified format.

IIncrementOperators<Char>.CheckedIncrement(Char)

Increments a value.

IIncrementOperators<Char>.Increment(Char)

Increments a value.

IMinMaxValue<Char>.MaxValue

Gets the maximum value of the current type.

IMinMaxValue<Char>.MinValue

Gets the minimum value of the current type.

IModulusOperators<Char,Char,Char>.Modulus(Char, Char)

Divides two values together to compute their modulus or remainder.

IMultiplicativeIdentity<Char,Char>.MultiplicativeIdentity

Gets the multiplicative identity of the current type.

IMultiplyOperators<Char,Char,Char>.CheckedMultiply(Char, Char)

Multiplies two values together to compute their product.

IMultiplyOperators<Char,Char,Char>.Multiply(Char, Char)

Multiplies two values together to compute their product.

INumberBase<Char>.Abs(Char)

Computes the absolute of a value.

INumberBase<Char>.IsCanonical(Char)

Determines if a value is in its canonical representation.

INumberBase<Char>.IsComplexNumber(Char)

Determines if a value represents a complex number.

INumberBase<Char>.IsEvenInteger(Char)

Determines if a value represents an even integral number.

INumberBase<Char>.IsFinite(Char)

Determines if a value is finite.

INumberBase<Char>.IsImaginaryNumber(Char)

Determines if a value represents a pure imaginary number.

INumberBase<Char>.IsInfinity(Char)

Determines if a value is infinite.

INumberBase<Char>.IsInteger(Char)

Determines if a value represents an integral number.

INumberBase<Char>.IsNaN(Char)

Determines if a value is NaN.

INumberBase<Char>.IsNegative(Char)

Determines if a value is negative.

INumberBase<Char>.IsNegativeInfinity(Char)

Determines if a value is negative infinity.

INumberBase<Char>.IsNormal(Char)

Determines if a value is normal.

INumberBase<Char>.IsOddInteger(Char)

Determines if a value represents an odd integral number.

INumberBase<Char>.IsPositive(Char)

Determines if a value is positive.

INumberBase<Char>.IsPositiveInfinity(Char)

Determines if a value is positive infinity.

INumberBase<Char>.IsRealNumber(Char)

Determines if a value represents a real number.

INumberBase<Char>.IsSubnormal(Char)

Determines if a value is subnormal.

INumberBase<Char>.IsZero(Char)

Determines if a value is zero.

INumberBase<Char>.MaxMagnitude(Char, Char)

Compares two values to compute which is greater.

INumberBase<Char>.MaxMagnitudeNumber(Char, Char)

Compares two values to compute which has the greater magnitude and returning the other value if an input is NaN.

INumberBase<Char>.MinMagnitude(Char, Char)

Compares two values to compute which is lesser.

INumberBase<Char>.MinMagnitudeNumber(Char, Char)

Compares two values to compute which has the lesser magnitude and returning the other value if an input is NaN.

INumberBase<Char>.One

Gets the value 1 for the type.

INumberBase<Char>.Parse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider)

Parses a span of characters into a value.

INumberBase<Char>.Parse(String, NumberStyles, IFormatProvider)

Parses a string into a value.

INumberBase<Char>.Radix

Gets the radix, or base, for the type.

INumberBase<Char>.TryConvertFromChecked<TOther>(TOther, Char)
INumberBase<Char>.TryConvertFromSaturating<TOther>(TOther, Char)
INumberBase<Char>.TryConvertFromTruncating<TOther>(TOther, Char)
INumberBase<Char>.TryConvertToChecked<TOther>(Char, TOther)

Tries to convert an instance of the the current type to another type, throwing an overflow exception for any values that fall outside the representable range of the current type.

INumberBase<Char>.TryConvertToSaturating<TOther>(Char, TOther)

Tries to convert an instance of the the current type to another type, saturating any values that fall outside the representable range of the current type.

INumberBase<Char>.TryConvertToTruncating<TOther>(Char, TOther)

Tries to convert an instance of the the current type to another type, truncating any values that fall outside the representable range of the current type.

INumberBase<Char>.TryParse(ReadOnlySpan<Char>, NumberStyles, IFormatProvider, Char)
INumberBase<Char>.TryParse(String, NumberStyles, IFormatProvider, Char)
INumberBase<Char>.Zero

Gets the value 0 for the type.

IParsable<Char>.Parse(String, IFormatProvider)

Parses a string into a value.

IParsable<Char>.TryParse(String, IFormatProvider, Char)
IShiftOperators<Char,Int32,Char>.LeftShift(Char, Int32)

Shifts a value left by a given amount.

IShiftOperators<Char,Int32,Char>.RightShift(Char, Int32)

Shifts a value right by a given amount.

IShiftOperators<Char,Int32,Char>.UnsignedRightShift(Char, Int32)

Shifts a value right by a given amount.

ISpanFormattable.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Tries to format the value of the current instance into the provided span of characters.

ISpanParsable<Char>.Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a span of characters into a value.

ISpanParsable<Char>.TryParse(ReadOnlySpan<Char>, IFormatProvider, Char)
ISubtractionOperators<Char,Char,Char>.CheckedSubtraction(Char, Char)

Subtracts two values to compute their difference.

ISubtractionOperators<Char,Char,Char>.Subtraction(Char, Char)

Subtracts two values to compute their difference.

IUnaryNegationOperators<Char,Char>.CheckedUnaryNegation(Char)

Computes the checked unary negation of a value.

IUnaryNegationOperators<Char,Char>.UnaryNegation(Char)

Computes the unary negation of a value.

IUnaryPlusOperators<Char,Char>.UnaryPlus(Char)

Computes the unary plus of a value.

IUtf8SpanFormattable.TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Tries to format the value of the current instance as UTF-8 into the provided span of bytes.

Applies to

Thread Safety

All members of this type are thread safe. Members that appear to modify instance state actually return a new instance initialized with the new value. As with any other type, reading and writing to a shared variable that contains an instance of this type must be protected by a lock to guarantee thread safety.

See also