Byte array to String in .Net 3.5


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

ASCIIEncoding class has another method, GetByte(), which does the opposite of this one.


Copy this code and paste it in your HTML
  1. // Converting a Byte Array to a String object
  2. using System.Text;
  3.  
  4. public byte[] ByteArrayToString(string str)
  5. {
  6. return new ASCIIEncoding().GetString(str);
  7. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.