Click here to Skip to main content
15,891,904 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.

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
 
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

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