hex string: 5000005355....
ASCII: P<null><null>SU...
I can do it and the string length also includes nulls but when I concatenate other string, it doesn't show as its part.
Expand|Select|Wrap|Line Numbers
- string HexValue = "500000535500";
- string StrValue = "";
- while (HexValue.Length > 0)
- {
- StrValue += System.Convert.ToChar(System.Convert.ToUInt32(HexValue.Substring(0, 2), 16)).ToString();
- HexValue = HexValue.Substring(2, HexValue.Length - 2);
- }
- StrValue += "hello";
- textASCII.Text = StrValue;
- MessageBox.Show(StrValue.Length.ToString());
Or .. is there some problem with the text field in which I am displaying the result?
Actually, I need to send the string containing nulls through socket.