c# - String to byte[] and vice versa? -


possible duplicate:
.net string byte array c#

how convert string byte[] array , vice versa? need strings stored in binary storage. please show example in both directions. , 1 more thing: each string maybe bigger 90kb.

if want use utf-8 encoding:

// string byte[] byte[] bytes = encoding.utf8.getbytes(somestring);  // byte[] string string anotherstring = encoding.utf8.getstring(bytes); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -