This might sound odd, but my issue is that I have a text string of hex values from a text file, like so:
\"0x0f, 0x40, 0xff, ....\"
I have
If your string is in the correct format you can create your array using this code (will throw exceptions if the input is badly formatted):
var text = "0x0f, 0x40, 0xff";
var bytes = text
.Split(new[] { ", " }, StringSplitOptions.None)
.Select(s => (Byte) Int32.Parse(s.Substring(2), AllowHexSpecifier));