Char.ToUpperInvariant(Char) Char.ToUpperInvariant(Char) Char.ToUpperInvariant(Char) Char.ToUpperInvariant(Char) Method

定義

使用不因文化特性而異的轉換規則,將 Unicode 字元的值轉換成其大寫的同等項目。Converts the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture.

public:
 static char ToUpperInvariant(char c);
public static char ToUpperInvariant (char c);
static member ToUpperInvariant : char -> char
Public Shared Function ToUpperInvariant (c As Char) As Char

參數

c
Char Char Char Char

要轉換的 Unicode 字元。The Unicode character to convert.

傳回

c 參數的對等大寫;如果 c 已經是大寫或不是英文字母,則為未變更的 c 值。The uppercase equivalent of the c parameter, or the unchanged value of c, if c is already uppercase or not alphabetic.

備註

如果您的應用程式不受目前文化特性的影響,而且取決於以可預測方式變更的字元大小寫ToUpperInvariant ,請使用方法。If your application is unaffected by the current culture and depends on the case of a character changing in a predictable way, use the ToUpperInvariant method. 方法相當於ToUpper(Char, CultureInfo.InvariantCulture)ToUpperInvariantThe ToUpperInvariant method is equivalent to ToUpper(Char, CultureInfo.InvariantCulture).

String.ToUpperInvariant來將字串轉換成大寫。Use String.ToUpperInvariant to convert a string to uppercase.

適用於

另請參閱