Answers for "c# convert string to char list"

C#
0

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);  
}
Posted by: Guest on May-31-2020
-2

how to turn a string in a char list c#

string str= "hello";
List<char> listString = str.ToList();
//Display the list
listString.ForEach(s=> Console.WriteLine(s));
//or
Console.WriteLine(listString);
Posted by: Guest on November-04-2020

C# Answers by Framework

Browse Popular Code Answers by Language