G
Guest
Hi,
I have the following binary data:
StringData = 800006000000;
which is equivalent to the following:
byte[] bytes = new byte[6];
bytes[0] = 0x80;
bytes[1] = 0x00;
bytes[2] = 0x06;
bytes[3] = 0x00;
bytes[4] = 0x00;
bytes[5] = 0x00;
How can I parse the string StringData to the equivalent byte array above?
I tried the following:
byte[] bytes = Encoding.ASCII.GetBytes(StringData);
but it gave me back garbage data.
This bytes[0] = 0x80; is equivalent to bytes[0] = 128;
Any help would be appreciated.
Thanks,
Yama
I have the following binary data:
StringData = 800006000000;
which is equivalent to the following:
byte[] bytes = new byte[6];
bytes[0] = 0x80;
bytes[1] = 0x00;
bytes[2] = 0x06;
bytes[3] = 0x00;
bytes[4] = 0x00;
bytes[5] = 0x00;
How can I parse the string StringData to the equivalent byte array above?
I tried the following:
byte[] bytes = Encoding.ASCII.GetBytes(StringData);
but it gave me back garbage data.
This bytes[0] = 0x80; is equivalent to bytes[0] = 128;
Any help would be appreciated.
Thanks,
Yama