public static StrToByteArray ( string str ) : byte[] | ||
str | string | String to convert to a byte array. |
return | byte[] |
public static byte[] StrToByteArray(string str)
{
System.Text.ASCIIEncoding encoding=new System.Text.ASCIIEncoding();
return encoding.GetBytes(str);
}