private static byte GetByte(string record, ref int index, ref int checksum)
{
if (record.Length < index + 1)
{
Trace.WriteLine("index out of bounds");
return 0;
}
char c1 = record[index];
index++;
char c2 = record[index];
index++;
string s = string.Format("{0}{1}", c1, c2);
byte b = byte.Parse(s, System.Globalization.NumberStyles.HexNumber);
checksum += b;
return b;
}