convert 6 lines of c++ to C#.net or vb.net

convert 6 lines of c++ to C#.net or vb.net

Page 1 of 1

1 Replies - 2022 Views - Last Post: 28 November 2010 - 12:05 PM Rate Topic: -----

#1 waleednosir  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 28-November 10

convert 6 lines of c++ to C#.net or vb.net

Posted 28 November 2010 - 11:26 AM

Dear All ,

I am a C#.net , vb.net user . I have a problem with a code that has only 6 lines in C++ that I want to translate to vb.net or C# . Here is the code :



GUCHAR GenerateCkSum(GUCHAR *pure_data, U2 size)
{
GUCHAR chksum;
I2 i;
chksum = pure_data[0];
for(i=1; i<size ; i++)
chksum ^= pure_data[i];
return chksum;
}



the code calcualtes the checksum of a string . it makes for the following string "PTSI000,TSI" >>> gives a checksum of 4C. How can i make the code in C#.net or vb.net .


Thank you all for your support ,

WSN

MOD EDIT: When posting code...USE CODE TAGS!!!

This post has been edited by JackOfAllTrades: 28 November 2010 - 12:25 PM


Is This A Good Question/Topic? 0
  • +

Replies To: convert 6 lines of c++ to C#.net or vb.net

#2 Salem_c  Icon User is online

  • void main'ers are DOOMED
  • member icon

Reputation: 1708
  • View blog
  • Posts: 3,284
  • Joined: 30-May 10

Re: convert 6 lines of c++ to C#.net or vb.net

Posted 28 November 2010 - 12:05 PM

cross-posting madness!
http://www.cplusplus.../windows/32203/
http://forums.devshe...net-767025.html

And others.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1