how to convert string to char array in c# code example
Example 1: c# string to character array
string chars = "Array";
char[] letters = chars.toCharArray();
Example 2: how to turn a string in a char list c#
string sentence = "Mahesh Chand";
char[] charArr = sentence.ToCharArray();
foreach (char ch in charArr)
{
Console.WriteLine(ch);
}
Example 3: how to turn a string in a char list c#
string str= "hello";
List<char> listString = str.ToList();
listString.ForEach(s=> Console.WriteLine(s));
Console.WriteLine(listString);