Hello,

I have a routine that is currently in c++ and I really need to have it converted to c sharp. Could someone with a lot more knowledge then myself have a look at the code and help me out.

The code follows:

Thanks

Mike

This is the c++ code.

Code:
char * computeChecksum(char*  message)
        {
            static char ascii_checksum[ 5 ];
            WORD checksum     = 0
            int i                          = 0;

            while ( message[i] != '\0';
            {
               checksum += (unsigned) message[i];
               i++ ;
            }

            checksum =    -(checksum & 0xFFFF);
            sprintf( ascii_checksum, "%4.4X, checksum );
      
            return ascii_checksum;

        }