Display a string, one char at a time : Chars in String « String « C# / CSharp Tutorial






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");   
  }
}
Display str1, one char at a time.
ABCDEabcde1234567890








5.3.Chars in String
5.3.1.Getting a char[] from a string
5.3.2.Display a string, one char at a time
5.3.3.Creating Strings from char array