Char 結構
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將字元表示為 UTF-16 程式碼單位。
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)
- 繼承
- 屬性
- 實作
-
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>
範例
下列程式代碼範例示範 中的 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
備註
如需此 API 的詳細資訊,請參閱 Char 的補充 API 備註。
欄位
MaxValue |
表示 Char 最大的可能值。 這個欄位為常數。 |
MinValue |
表示 Char 最小的可能值。 這個欄位為常數。 |
方法
CompareTo(Char) |
比較這個執行個體與指定的 Char 物件,並且表示這個執行個體在排序次序中,位於所指定 Char 物件之前、之後或相同位置。 |
CompareTo(Object) |
比較這個執行個體與指定的物件,並且表示這個執行個體在排序次序中,位於所指定 Object 之前、之後或相同位置。 |
ConvertFromUtf32(Int32) |
將指定之 Unicode 字碼指標轉換成 UTF-16 編碼的字串。 |
ConvertToUtf32(Char, Char) |
將 UTF-16 編碼之 Surrogate 字組的值轉換成 Unicode 字碼指標。 |
ConvertToUtf32(String, Int32) |
將字串中指定之位置上的 UTF-16 編碼之字元或 Surrogate 字組的值轉換成 Unicode 字碼指標。 |
Equals(Char) |
傳回值,表示這個執行個體是否等於指定的 Char 物件。 |
Equals(Object) |
傳回值,這個值指出此執行個體是否與指定的物件相等。 |
GetHashCode() |
傳回這個執行個體的雜湊碼。 |
GetNumericValue(Char) |
將指定的數字 Unicode 字元轉換成雙精確度浮點數。 |
GetNumericValue(String, Int32) |
將指定字串中指定位置的數字 Unicode 字元轉換成雙精確度浮點數。 |
GetTypeCode() | |
GetUnicodeCategory(Char) |
將指定的 Unicode 字元分類至由其中一個 UnicodeCategory 值所識別的群組。 |
GetUnicodeCategory(String, Int32) |
將指定字串中指定位置處的字元,分類至由其中一個 UnicodeCategory 值所識別的群組。 |
IsAscii(Char) |
|
IsAsciiDigit(Char) |
指出字元是否分類為 ASCII 數位。 |
IsAsciiHexDigit(Char) |
指出字元是否分類為 ASCII 十六進位數位。 |
IsAsciiHexDigitLower(Char) |
指出字元是否分類為 ASCII 小寫十六進位數位。 |
IsAsciiHexDigitUpper(Char) |
指出字元是否分類為 ASCII 大寫十六進位數位。 |
IsAsciiLetter(Char) |
指出字元是否分類為 ASCII 字母。 |
IsAsciiLetterLower(Char) |
指出字元是否分類為小寫 ASCII 字母。 |
IsAsciiLetterOrDigit(Char) |
指出字元是否分類為 ASCII 字母或數位。 |
IsAsciiLetterUpper(Char) |
指出字元是否分類為大寫 ASCII 字母。 |
IsBetween(Char, Char, Char) |
指出字元是否在指定的內含範圍內。 |
IsControl(Char) |
指示指定的 Unicode 字元是否分類為控制字元。 |
IsControl(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為控制字元。 |
IsDigit(Char) |
指示指定的 Unicode 字元是否分類為十進位數字。 |
IsDigit(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為十進位數字。 |
IsHighSurrogate(Char) |
指出指定的 Char 物件是否為高 Surrogate。 |
IsHighSurrogate(String, Int32) |
表示字串中指定位置處的 Char 物件是否為高 Surrogate。 |
IsLetter(Char) |
表示指定的 Unicode 字元是否分類為 Unicode 字母。 |
IsLetter(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為 Unicode 字母。 |
IsLetterOrDigit(Char) |
指示指定的 Unicode 字元是否分類為字母或十進位數字。 |
IsLetterOrDigit(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為字母或十進位數字。 |
IsLower(Char) |
指示指定的 Unicode 字元是否分類為小寫字母。 |
IsLower(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為小寫字母。 |
IsLowSurrogate(Char) |
指出指定的 Char 物件是否為低 Surrogate。 |
IsLowSurrogate(String, Int32) |
表示字串中指定位置處的 Char 物件是否為低 Surrogate。 |
IsNumber(Char) |
指示指定的 Unicode 字元是否分類為數字。 |
IsNumber(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為數字。 |
IsPunctuation(Char) |
指示指定的 Unicode 字元是否分類為標點符號。 |
IsPunctuation(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為標點符號。 |
IsSeparator(Char) |
指示指定的 Unicode 字元是否分類為分隔符號字元。 |
IsSeparator(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為分隔符號字元。 |
IsSurrogate(Char) |
指出指定的字元是否有 Surrogate 字碼單位。 |
IsSurrogate(String, Int32) |
指出位於指定的字串中指定位置處的字元是否有 Surrogate 字碼單位。 |
IsSurrogatePair(Char, Char) |
表示兩個指定的 Char 物件是否組成 Surrogate 字組。 |
IsSurrogatePair(String, Int32) |
表示字串中指定位置處的兩個相鄰 Char 物件是否組成 Surrogate 字組。 |
IsSymbol(Char) |
指示指定的 Unicode 字元是否分類為符號字元。 |
IsSymbol(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為符號字元。 |
IsUpper(Char) |
指示指定的 Unicode 字元是否分類為大寫字母。 |
IsUpper(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為大寫字母。 |
IsWhiteSpace(Char) |
指示指定的 Unicode 字元是否分類為泛空白字元。 |
IsWhiteSpace(String, Int32) |
指示指定的字串中指定位置處的字元是否分類為泛空白字元。 |
Parse(String) |
將指定的字串值轉換成它的對等 Unicode 字元。 |
ToLower(Char) |
將 Unicode 字元值轉換成它的對等小寫。 |
ToLower(Char, CultureInfo) |
使用指定的特定文化特性格式資訊,將指定的 Unicode 字元值轉換成它的對等小寫。 |
ToLowerInvariant(Char) |
使用不因文化特性而異 (Invariant Culture) 的轉換規則,將 Unicode 字元的值轉換成其小寫的同等項目。 |
ToString() |
將這個執行個體的值轉換為它的相等字串表示。 |
ToString(Char) |
將指定的 Unicode 字元轉換成它的對等字串表示。 |
ToString(IFormatProvider) |
使用指定的特定文化特性的格式資訊,將這個執行個體的值轉換為它的對等字串表示。 |
ToUpper(Char) |
將 Unicode 字元值轉換成它的對等大寫。 |
ToUpper(Char, CultureInfo) |
使用指定的特定文化特性格式資訊,將指定的 Unicode 字元值轉換成它的對等大寫。 |
ToUpperInvariant(Char) |
使用不因文化特性而異的轉換規則,將 Unicode 字元的值轉換成其大寫的同等項目。 |
TryParse(String, Char) |
將指定的字串值轉換成它的對等 Unicode 字元。 傳回碼 (Return Code) 會指出轉換是成功或是失敗。 |
明確介面實作
適用於
執行緒安全性
此類型的所有成員都是安全線程。 看似修改實例狀態的成員,實際上會傳回以新值初始化的新實例。 如同任何其他類型,讀取和寫入包含此類型實例的共用變數必須受到鎖定保護,以確保線程安全。
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應