The Char.IsUpper() method in C# indicates whether the specified Unicode character is categorized as an uppercase letter.
Syntax
public static bool IsUpper (char ch);
Above, the parameter ch is the Unicode character to evaluate.
Let us now see an example to implement the Char.IsUpper() method −
Example
using System;
public class Demo {
public static void Main(){
bool res;
char val = 'H';
Console.WriteLine("Value = "+val);
res = Char.IsUpper(val);
Console.WriteLine("Is the value an uppercae letter? = "+res);
}
}Output
This will produce the following output −
Value = H Is the value an uppercae letter? = True
Let us now see another example to implement IsUpper() method −
Example
using System;
public class Demo {
public static void Main(){
bool res;
char val = 'j';
Console.WriteLine("Value = "+val);
res = Char.IsUpper(val);
Console.WriteLine("Is the value an uppercae letter? = "+res);
}
}Output
This will produce the following output −
Value = j Is the value an uppercae letter? = False