using System;
public class Program
{
private static byte GetCRC(byte[] message)
if (message.Length > 0)
int CR = 0;
for (int i = 0; i < message.Length; i++)
if (i != 8)
CR = CR ^ message[i];
}
return (byte)CR;
return 0;
public static void Main()
Console.WriteLine("crc: " + GetCRC(new byte[] { 69, 77, 80, 73, 83 }));