Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type of member is not CLS-compliant
Message
De
02/08/2011 11:20:44
 
 
À
02/08/2011 11:01:17
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01519895
Message ID:
01519899
Vues:
37
>The following line gives a warning:
>
>
>        Public nCRC32 As UInteger = 0
>
>
>"Type of member 'nCRC32' is not CLS-compliant."
>
>I have been trying to find where in the compile options to avoid that but was unable to find a setting. Is there such a setting?

Michel,

I suppose this is related to yesterday

I see your class uses a property to store nCRC32 Integer

You could add an extra method that takes the calculated nCRC and returns a UInteger

something like - There may be syntax errors


pseudo code
   if( nCRC32 is not negative)
       returnvalue = nCRC32 converted to UInteger
   else
    set leftmost bit to zero
      convert to UInteger
      add  &H80000000UI
public function GetUnsignedCRC() as UInteger
   
    dim uCRC as UInteger
    if( nCRC32  >= 0 ) then
        uCRC = CType(nCRC32 , UInteger)
    else
         uCRC = CType( (nCRC32 And &H7FFFFFFF), UInteger) + &H80000000UI
   endif

  return uCRC 
end function
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform