Convert Byte Array to String


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. byte [] dBytes = { 1, 2, 3, 4, 5}
  2. string str;
  3. System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
  4. str = enc.GetString(dBytes);

Report this snippet


Comments


You need to login to view comments.