Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need sys(2007) in c#
Message
De
17/07/2014 12:27:11
John Baird
Coatesville, Pennsylvanie, États-Unis
 
 
À
17/07/2014 11:40:43
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01603909
Message ID:
01603922
Vues:
46
>thanks for the c++ - I'm trying to convert it to c# and there are no pointers in C# so it's causing me some difficulty
>
>does anyone have any ideas how to convert this method to c#?
>
>LOCAL void CalcCkSum(void *ptr, long cb)
>{
>long cktemp = 0;
>long cl = cb >> 2;
>long *lp = (long *) ptr;
>TEXT *cp;
>
>
>while(cl--)
>cktemp ^= *lp++;
>cl = cb & 3; // Any remainder?
>cp = (TEXT *)lp;
>while(cl--)
>cktemp ^= *cp++;
>
>
>ObjectCheckSum ^= cktemp;
>ObjectCheckSum ^= cktemp >> 8;
>ObjectCheckSum ^= cktemp >> 16;
>ObjectCheckSum ^= cktemp >> 24;
>}
>
>http://computer-programming-forum.com/2-vfp/ac93d844790b80c7.htm


There are pointers in c#... Look at managing Unsafe code...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform