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
Post a Comment