SyntaxFix
Write A Post
Hire A Developer
Questions
Do you mean like this
int index = 2; string s = "hello"; Console.WriteLine(s[index]);
string also implements IEnumberable<char> so you can also enumerate it like this
IEnumberable<char>
foreach (char c in s) Console.WriteLine(c);