I guess its very simple but it wasted my time a lot but still no luck!
the following is working very nicely-
sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
byte[] bytes=new byte[]{0x7F, 0x00, 0x00, 0x21, 0x09, 0x7F, 0x30, 0x00, 0x15, 0x02, 0x02, 0x00, 0xEE, 0x28, 0xCB, 0x87 };
sck.Connect("192.168.1.100", 8008);
sck.Send(bytes);
sck.Close();
and, if I keep those array of hex strings in a text box like-
textbox1.Text="0x7F, 0x00, 0x00, 0x21, 0x09, 0x7F, 0x30, 0x00, 0x15, 0x02, 0x02, 0x00, 0xEE, 0x28, 0xCB, 0x87";
But, I need to use the textbox1.Text string for the same task; like-
sck.Send(textbox1.Text);
I tried a lot but could not come up with any solution. Please guide me...
In fact, I'll keep the hex string in the database as string and will be retrieved later in my program.