Use textBox3.Text.Split()to get an array of strings, each of which has a length of 2.
Then use byte.Parse(part, NumberStyles.HexNumber)in a loop to convert each part from hexadecimal to integer.
Using LINQ, it can be written as follows:
byte[] result = textBox3.Text.Split(' ')
.Select(part => byte.Parse(part, System.Globalization.NumberStyles.HexNumber))
.ToArray();
source
share