C# Char IsUpper(String, Int32)
Description
Char IsUpper(String, Int32)
indicates whether the character
at the specified position in a specified string is categorized as an uppercase
letter.
Syntax
Char.IsUpper(String, Int32)
has the following syntax.
public static bool IsUpper(
string s,
int index
)
Parameters
Char.IsUpper(String, Int32)
has the following parameters.
s
- A string.index
- The position of the character to evaluate in s.
Returns
Char.IsUpper(String, Int32)
method returns true if the character at position index in s is an uppercase letter; otherwise,
false.
Example
The following code shows how to use Char.IsUpper(String, Int32) method.
//w w w .ja v a2s . c o m
using System;
public class MainClass {
public static void Main() {
string str = "characters";
Console.WriteLine(Char.IsUpper(str, 8));
}
}
The code above generates the following result.