Created
April 23, 2012 23:22
-
-
Save kendfrey/2474500 to your computer and use it in GitHub Desktop.
String to ASCII
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string str = "Hello!"; | |
byte[] ascii = new byte[str.Length]; | |
for (int i = 0; i < ascii.Length; i++) | |
{ | |
ascii[i] = (byte)str[i]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment