public class CRC
    {
        private static int POLYNOMIAL = 0x8408;
        private static int PRESET_VALUE = 0xFFFF;

        public static int crc16(string hex)
        {
            byte[] data = HexStringToByteArray(hex);
            int current_crc_value = PRESET_VALUE;
            for (int i = 0; i < data.Length; i++)
            {
                current_crc_value ^= data[i] & 0xFF;
                for (int j = 0; j < 8; j++)
                {
                    if ((current_crc_value & 1) != 0)
                    {
                        current_crc_value = (current_crc_value >> 1) ^ POLYNOMIAL;
                    }
                    else
                    {
                        current_crc_value = current_crc_value >> 1;
                    }
                }
            }
            return current_crc_value;
        }
        //16进制数组字符串转换         
        private static byte[] HexStringToByteArray(string s)
        {
            s = s.Replace(" ", "");
            byte[] buffer = new byte[s.Length / 2];
            for (int i = 0; i < s.Length; i += 2)
                buffer[i / 2] = (byte)Convert.ToByte(s.Substring(i, 2), 16);
            return buffer;
        }
    }
	
调用示例：

string input = "1500010301010C300833B2DDD90140000000002A80BE";//读写器AT指令返回值，也可用于指令发送校验CRC

int bytes = CRC.crc16(input);

// bytes=0；bytes等于0表示通过，其他值不通过！

