ZylSerialPort.NET

SerialPort.StringToASCIIByteArray Method 

Converts string to ASCII byte array.

[Visual Basic]
Public Shared Function StringToASCIIByteArray( _
   ByVal String As String _
) As Byte()
[C#]
public static byte[] StringToASCIIByteArray(
   String text
);

Parameters

String
String value to be converted,

Return Value

Byte array representation of the string.

See Also

SerialPort Class | ZylSerialPort Namespace