SyntaxFix
Write A Post
Hire A Developer
Questions
Just cast each character to an int:
for (int i = 0; i < str.length; i++) Console.Write(((int)str[i]).ToString());