Hi Firuz,
The easiest way to convert a string into a byte array is to use the GetBytes() method of an instantiated text encoding class, consider the below example.
C#
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
Byte[] bytes = encoding.GetBytes("Test");
VB
Dim encoding As New System.Text.ASCIIEncoding()
Dim bytes As [Byte]() = encoding.GetBytes("Test")