|
-
January 7th, 2010, 01:08 AM
#5
Re: byte [] and string
.net strings are 16 bit arrays, so they are capable of storing a byte array of any size without issue. The only time you run into issues is when you encode it using a schema that is limited (such as ascii) or if you need to be able to print the contents of the string (non-printable characters).
if you were to translate it directly into a string (appending each byte as a character in the string) you would be able to store each byte into the string, but wouldn't be able to print the string. base 64 encoding (much like encoding your bytes to their hex equiv.) allows you to actually print and see the byte array within the printable character subset.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|