I have a simple MAC address as a string, "b8:27:eb:97:b6:39", and I would like to get it into a byte array, [184, 39, 235, 151, 182, 57] in C# code.
So I split it up with the following:
var split = str.Split(':');
byte[] arr = new byte[6];
And then I need some sort of for-loop to take each substring turn them into a 16-bit int.
I tried Convert.ToInt8(split[i]), split[i].ToChar(0,2), (char)split[i], but I can't figure out how to take to string-characters and let them be a single 8-bit number.