Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# string to byte[]

using System.Text;
public static byte[] encode(string stringToEncode)
{
  UTF8Encoding utf8 = new UtF8Encoding();
  byte[] bytename = new byte[1024];
bytename = utf8.GetBytes(stringToEncode);
  return bytename;
}
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #string
ADD COMMENT
Topic
Name
7+2 =