How do I transform the following code in C#. My C is a little bit rusty (well... very very rusted):
short CalcCrc(char *str,int len)
{
short crc=0;
for(int i=0;i<len;i++)
crc ^= (short)((unsigned char)str[i]) << (i%9);
return crc;
}
Thank you!