Check if a character is Lower case in CSharp
Description
The following code shows how to check if a character is Lower case.
Example
//ww w . j a va2 s. c o m
using System;
class MainClass {
public static void Main() {
string str = "This is a test from java2s.com. $23";
int i;
for(i=0; i < str.Length; i++) {
Console.Write(str[i] + " is");
if(Char.IsLower(str[i]))
Console.Write(" lowercase");
if(Char.IsUpper(str[i]))
Console.Write(" uppercase");
Console.WriteLine();
}
}
}
The code above generates the following result.