Salut j'aimerais savoir comment on traduit en C# ce prog :
_U16 crc = (_U16)0xffff;
if(crc & (_U16)0x8000) crc=(crc<<1)^(_U16)0x1021;
Merci
Salut j'aimerais savoir comment on traduit en C# ce prog :
_U16 crc = (_U16)0xffff;
if(crc & (_U16)0x8000) crc=(crc<<1)^(_U16)0x1021;
Merci
essaye sans (_U16)
ou au pire tu le remplaces par (Int16)
En C# on déclare un entier non signé 16 bits avec UInt16. Pour le reste c'est directement compris par le C# donc pas de changement.
++
Ca s'apelle aussiUInt16, Int16 => 16 bits => ushort, short
Code : Sélectionner tout - Visualiser dans une fenêtre à part ushort
UInt32, Int32 => 32 bits => uint, int
UInT64, Int64 => 64 bits => ulong, long
Partager