A
AMP
Hello,
First, Thanks for ALL your help.
Second, another question:
I have some c code i am turning into c#truncated)
WORD calcChecksum(BYTE data[], WORD length)
/* Calculates a checksum of "data".
*/
{
WORD* i_data;
WORD checksum= 0;
BYTE i= 0;
i_data= (WORD*)data;
TURNS INTO:
ushort calcChecksum(byte[] data, ushort length)
/* Calculates a checksum of "data".
*/
{
ushort i_data;
ushort checksum= 0;
byte i= 0;
i_data= (ushort)data;
I am getting an error that :
Cannot convert type 'byte[]' to 'ushort'
If it can be done in c I'm sure I'm just missing something.
Any help would be appreciated.
Thanks
Mike
First, Thanks for ALL your help.
Second, another question:
I have some c code i am turning into c#truncated)
WORD calcChecksum(BYTE data[], WORD length)
/* Calculates a checksum of "data".
*/
{
WORD* i_data;
WORD checksum= 0;
BYTE i= 0;
i_data= (WORD*)data;
TURNS INTO:
ushort calcChecksum(byte[] data, ushort length)
/* Calculates a checksum of "data".
*/
{
ushort i_data;
ushort checksum= 0;
byte i= 0;
i_data= (ushort)data;
I am getting an error that :
Cannot convert type 'byte[]' to 'ushort'
If it can be done in c I'm sure I'm just missing something.
Any help would be appreciated.
Thanks
Mike