struct char

in global :: System

Represents a character as a UTF-16 code unit.


public int CompareTo( char value )

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.

  • value A object to compare.
  • Returns A signed number indicating the position of this instance in the sort order in relation to the parameter. Return Value Description Less than zero This instance precedes . Zero This instance has the same position in the sort order as . Greater than zero This instance follows .

public int CompareTo( object value )

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 .

  • value An object to compare this instance to, or .
  • Returns A signed number indicating the position of this instance in the sort order in relation to the parameter. Return Value Description Less than zero This instance precedes . Zero This instance has the same position in the sort order as . Greater than zero This instance follows . -or- is .

public static string ConvertFromUtf32( int utf32 )

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

  • utf32 A 21-bit Unicode code point.
  • Returns A string consisting of one object or a surrogate pair of objects equivalent to the code point specified by the parameter.

public static int ConvertToUtf32( char highSurrogate, char lowSurrogate )

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

  • highSurrogate A high surrogate code unit (that is, a code unit ranging from U+D800 through U+DBFF).
  • lowSurrogate A low surrogate code unit (that is, a code unit ranging from U+DC00 through U+DFFF).
  • Returns The 21-bit Unicode code point represented by the and parameters.

public static int ConvertToUtf32( string s, int index )

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

  • s A string that contains a character or surrogate pair.
  • index The index position of the character or surrogate pair in .
  • Returns The 21-bit Unicode code point represented by the character or surrogate pair at the position in the parameter specified by the parameter.

public bool Equals( char obj )

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

  • obj An object to compare to this instance.
  • Returns if the parameter equals the value of this instance; otherwise, .

public bool Equals( object obj )

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

  • obj An object to compare with this instance or .
  • Returns if is an instance of and equals the value of this instance; otherwise, .

public static double GetNumericValue( char c )

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

  • c The Unicode character to convert.
  • Returns The numeric value of if that character represents a number; otherwise, -1.0.

public static double GetNumericValue( string s, int index )

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

  • s A .
  • index The character position in .
  • Returns The numeric value of the character at position in if that character represents a number; otherwise, -1.

public static UnicodeCategory GetUnicodeCategory( char c )

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

  • c The Unicode character to categorize.
  • Returns A value that identifies the group that contains .

public static UnicodeCategory GetUnicodeCategory( string s, int index )

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

  • s A .
  • index The character position in .
  • Returns A enumerated constant that identifies the group that contains the character at position in .

public static bool IsControl( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a control character; otherwise, .

public static bool IsControl( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a control character; otherwise, .

public static bool IsDigit( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a decimal digit; otherwise, .

public static bool IsDigit( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a decimal digit; otherwise, .

public static bool IsHighSurrogate( char c )

Indicates whether the specified object is a high surrogate.

  • c The Unicode character to evaluate.
  • Returns if the numeric value of the parameter ranges from U+D800 through U+DBFF; otherwise, .

public static bool IsHighSurrogate( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the numeric value of the specified character in the parameter ranges from U+D800 through U+DBFF; otherwise, .

public static bool IsLetter( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a letter; otherwise, .

public static bool IsLetter( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a letter; otherwise, .

public static bool IsLetterOrDigit( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a letter or a decimal digit; otherwise, .

public static bool IsLetterOrDigit( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a letter or a decimal digit; otherwise, .

public static bool IsLower( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a lowercase letter; otherwise, .

public static bool IsLower( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a lowercase letter; otherwise, .

public static bool IsLowSurrogate( char c )

Indicates whether the specified object is a low surrogate.

  • c The character to evaluate.
  • Returns if the numeric value of the parameter ranges from U+DC00 through U+DFFF; otherwise, .

public static bool IsLowSurrogate( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the numeric value of the specified character in the parameter ranges from U+DC00 through U+DFFF; otherwise, .

public static bool IsNumber( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a number; otherwise, .

public static bool IsNumber( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a number; otherwise, .

public static bool IsPunctuation( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a punctuation mark; otherwise, .

public static bool IsPunctuation( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a punctuation mark; otherwise, .

public static bool IsSeparator( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a separator character; otherwise, .

public static bool IsSeparator( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a separator character; otherwise, .

public static bool IsSurrogate( char c )

Indicates whether the specified character has a surrogate code unit.

  • c The Unicode character to evaluate.
  • Returns if is either a high surrogate or a low surrogate; otherwise, .

public static bool IsSurrogate( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a either a high surrogate or a low surrogate; otherwise, .

public static bool IsSurrogatePair( char highSurrogate, char lowSurrogate )

Indicates whether the two specified objects form a surrogate pair.

  • highSurrogate The character to evaluate as the high surrogate of a surrogate pair.
  • lowSurrogate The character to evaluate as the low surrogate of a surrogate pair.
  • Returns if the numeric value of the parameter ranges from U+D800 through U+DBFF, and the numeric value of the parameter ranges from U+DC00 through U+DFFF; otherwise, .

public static bool IsSurrogatePair( string s, int index )

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

  • s A string.
  • index The starting position of the pair of characters to evaluate within .
  • Returns if the parameter includes adjacent characters at positions and + 1, and the numeric value of the character at position ranges from U+D800 through U+DBFF, and the numeric value of the character at position +1 ranges from U+DC00 through U+DFFF; otherwise, .

public static bool IsSymbol( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is a symbol character; otherwise, .

public static bool IsSymbol( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is a symbol character; otherwise, .

public static bool IsUpper( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is an uppercase letter; otherwise, .

public static bool IsUpper( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is an uppercase letter; otherwise, .

public static bool IsWhiteSpace( char c )

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

  • c The Unicode character to evaluate.
  • Returns if is white space; otherwise, .

public static bool IsWhiteSpace( string s, int index )

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

  • s A string.
  • index The position of the character to evaluate in .
  • Returns if the character at position in is white space; otherwise, .

public static char MaxValue

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

public static char MinValue

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

public static char Parse( string s )

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

  • s A string that contains a single character, or .
  • Returns A Unicode character equivalent to the sole character in .

public static char ToLower( char c )

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

  • c The Unicode character to convert.
  • Returns The lowercase equivalent of , or the unchanged value of , if is already lowercase or not alphabetic.

public static char ToLower( char c, CultureInfo culture )

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

  • c The Unicode character to convert.
  • culture An object that supplies culture-specific casing rules.
  • Returns The lowercase equivalent of , modified according to , or the unchanged value of , if is already lowercase or not alphabetic.

public static char ToLowerInvariant( char c )

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

  • c The Unicode character to convert.
  • Returns The lowercase equivalent of the parameter, or the unchanged value of , if is already lowercase or not alphabetic.

public static string ToString( char c )

Converts the specified Unicode character to its equivalent string representation.

  • c The Unicode character to convert.
  • Returns The string representation of the value of .

public string ToString( IFormatProvider provider )

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

  • provider (Reserved) An object that supplies culture-specific formatting information.
  • Returns The string representation of the value of this instance as specified by .

public static char ToUpper( char c )

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

  • c The Unicode character to convert.
  • Returns The uppercase equivalent of , or the unchanged value of if is already uppercase, has no uppercase equivalent, or is not alphabetic.

public static char ToUpper( char c, CultureInfo culture )

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

  • c The Unicode character to convert.
  • culture An object that supplies culture-specific casing rules.
  • Returns The uppercase equivalent of , modified according to , or the unchanged value of if is already uppercase, has no uppercase equivalent, or is not alphabetic.

public static char ToUpperInvariant( char c )

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

  • c The Unicode character to convert.
  • Returns The uppercase equivalent of the parameter, or the unchanged value of , if is already uppercase or not alphabetic.

public static bool TryParse( string s, ref char result )

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

  • s A string that contains a single character, or .
  • result When this method returns, contains a Unicode character equivalent to the sole character in , if the conversion succeeded, or an undefined value if the conversion failed. The conversion fails if the parameter is or the length of is not 1. This parameter is passed uninitialized.
  • Returns if the parameter was converted successfully; otherwise, .

public Type GetType( )

😔 No documentation found.

public TypeCode GetTypeCode( )

😔 No documentation found.

public static bool IsAsciiHexDigitLower( char c )

😔 No documentation found.

public static bool IsAsciiHexDigitUpper( char c )

😔 No documentation found.

public static bool IsAsciiHexDigit( char c )

😔 No documentation found.

public static bool IsAsciiLetterOrDigit( char c )

😔 No documentation found.

public static bool IsAsciiDigit( char c )

😔 No documentation found.

public static bool IsAsciiLetterUpper( char c )

😔 No documentation found.

public static bool IsAsciiLetterLower( char c )

😔 No documentation found.

public static bool IsAsciiLetter( char c )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public static bool IsBetween( char c, char minInclusive, char maxInclusive )

😔 No documentation found.

public static bool IsAscii( char c )

😔 No documentation found.