C Sharp - Convert to byte

 
byte[]  byteContent = null;
byteContent = (byte[])System.Text.Encoding.UTF8.GetBytes(yourString);
  you can store it as image in database


get data from database,etc
byte[] bytes = e.Result[0].jobdes; 

convert image into string.
textbox.text = UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length);

No comments:

Post a Comment