Char : Char : Data Type C# Examples


C# Examples » Data Type » Char »

 

Char









    
using  System;    
    
class  MainClass  {          
    public  static  void  Main()  {          
        string  str  =  "This  is  a  test.  $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();  
        }  
  
    }          
}
    
   
  
   



Output

T is uppercase
h is lowercase
i is lowercase
s is lowercase
  is
i is lowercase
s is lowercase
  is
a is lowercase
  is
t is lowercase
e is lowercase
s is lowercase
t is lowercase
. is
  is
$ is
2 is
3 is


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Type
» Char