Char - IsUpper
Indicates whether the specified Unicode character is categorized as an uppercase letter.
public static void Main() { char [] input = {'E','n','t','i','t','y',' ','F','r','a','m','e','w','o','r','k',' ','6','.','2'}; Console.WriteLine("Is each of the following characters in a upper case?"); for (int i = 0; i < input.Length; i++) { // C# Extension Method: Char - IsUpper var result = input[i].IsUpper(); Console.WriteLine("{0} : {1} ", input[i], result); } }
View Source
using System; public static partial class Extensions { /// <summary> /// Indicates whether the specified Unicode character is categorized as an uppercase letter. /// </summary> /// <param name="c">The Unicode character to evaluate.</param> /// <returns>true if is an uppercase letter; otherwise, false.</returns> public static Boolean IsUpper(this Char c) { return Char.IsUpper(c); } }