public void SetId(string value)
{
//clean up the string first
value = Regex.Replace(value, "[^a-z0-9]", string.Empty, RegexOptions.IgnoreCase);
//verify the length
if (value.Length != 24) {
throw new ArgumentException("The provided ID was not in an expected format.", "value");
}
//parse every pair of bytes
List<byte> bytes = new List<byte>();
for (int i = 0; i < value.Length; i += 2) {
string pair = value.Substring(i, 2);
byte parsed = byte.Parse(pair, NumberStyles.HexNumber);
bytes.Add(parsed);
}
//and then assign normally
this.SetId(bytes.ToArray());
}