Posted By

jx_boi on 09/07/10


Tagged

encode bytes


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

markstahler
Tyster


Encode string into Bytes


 / Published in: C#
 

  1. private byte[] EncodeMsg(string msg)
  2. {
  3. ASCIIEncoding encoder = new ASCIIEncoding();
  4. byte[] buffer = encoder.GetBytes(msg);
  5.  
  6. return buffer;
  7. }

Report this snippet  

You need to login to post a comment.