Click here to Skip to main content
15,905,682 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
how to separate text to be a letter (C#)

What I have tried:

how to separate text to be a letter
i have text =Juny
[J][u][n][y]
Posted
Updated 13-Sep-18 1:11am
Comments
Sinisa Hajnal 13-Sep-18 7:11am    
This really shouldn't be a question. You could easily google it.

string text = "Juny";
String[] letters = text.Split("");
 
Share this answer
 
C#
string text = "Juny";
List<char> letters = new List<char>();
letters.AddRange(text);
 
Share this answer
 
v2
Loads of ways, here are two:
C#
string input = "Juny";
foreach (char c in input)
   {
   Console.WriteLine(c);
   }
for (int i = 0; i < input.Length; i++)
   {
   Console.WriteLine(input[i]);
   }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900