Created
December 27, 2019 16:20
-
-
Save PSingletary/c1aa438fc559915689e7111f5d8a897d to your computer and use it in GitHub Desktop.
How to convert a string to a byte array and convert a byte array to a string - source: http://www.geekswithblogs.net/TimH/archive/2005/06/27/44849.aspx
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
| System.Text.Encoding enc = System.Text.Encoding.ASCII; | |
| byte[] myByteArray = enc.GetBytes("a text string"); | |
| string myString = enc.GetString(myByteArray ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment