Getting a char[] from a string : Chars in String « String « C# / CSharp Tutorial






using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;

public class MainClass
{
    public static void Main()
    {
        string s = "Hello, World.";

        char[] c1 = s.ToCharArray();
        char[] c2 = s.ToCharArray(0, 5);
    }

}








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