Char.IsUpper Method

Definition

指示 Unicode 字符是否属于大写字母类别。Indicates whether a Unicode character is categorized as an uppercase letter.

Overloads

IsUpper(Char)

指示指定的 Unicode 字符是否属于大写字母类别。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.

IsUpper(Char)

指示指定的 Unicode 字符是否属于大写字母类别。Indicates whether the specified Unicode character is categorized as an uppercase letter.

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

Parameters

c
Char

要计算的 Unicode 字符。The Unicode character to evaluate.

Returns

Boolean

如果 true 是一个大写字母,则为 c;否则为 falsetrue if c is an uppercase letter; otherwise, false.

Remarks

有效的大写字母是 UnicodeCategoryUppercaseLetter中以下类别的成员。Valid uppercase letters are members of the following category in UnicodeCategory: UppercaseLetter.

See also

IsUpper(String, Int32)

指示指定字符串中位于指定位置处的字符是否属于大写字母类别。Indicates whether the character at the specified position in a specified string is categorized as an uppercase letter.

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

Parameters

s
String

一个字符串。A string.

index
Int32

s 中要计算的字符的位置。The position of the character to evaluate in s.

Returns

Boolean

如果 true 中位于 index 的字符是一个大写字母,则为 s;否则为 falsetrue if the character at position index in s is an uppercase letter; otherwise, false.

Exceptions

snulls is null.

index 小于零或大于 s 中最后一个位置。index is less than zero or greater than the last position in s.

Remarks

字符串中的字符位置从零开始索引。Character positions in a string are indexed starting from zero.

有效的大写字母是 UnicodeCategoryUppercaseLetter中以下类别的成员。Valid uppercase letters are members of the following category in UnicodeCategory: UppercaseLetter.

See also

Applies to