Display a string, one char at a time : Chars in String : String C# Examples


C# Examples » String » Chars in String »

 

Display a string, one char at a time









    
using  System;    
    
class  MainClass  {      
    public  static  void  Main()  {      
        string  str1  =  "ABCDEabcde1234567890";      
        
        Console.WriteLine("Display  str1,  one  char  at  a  time.");  
        for(int  i=0;  i  <  str1.Length;  i++)    
            Console.Write(str1[i]);      
        Console.WriteLine("\n");      
    }
}
    
   
  
   



Output

Display str1, one char at a time.
ABCDEabcde1234567890


HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo String
» Chars in String