string hexString = txtHex.Text;
int discarded;
txtByteCount.Text = ((int)HexEncoding.GetByteCount(hexString)).ToString();
txtLength.Text = hexString.Length.ToString();
byte[] byteArray = HexEncoding.GetBytes(hexString, out discarded);

LEAVE A REPLY

Please enter your comment!
Please enter your name here