>>(1) The short way is to cast the return result to UInteger, and change the return type of GetCrc32() to UInteger
>
>This line cannot be changed to UInteger:
>
>
> Dim lnCRC32Result As Integer = &HFFFFFFFF
>
>
>It would give an error: "Constant expression not representable in type 'UInteger"
That seems odd (although I agree it is true).
The equivalent in C# is fine ( UInt32 lcCRC33Result = 0xFFFFFFFF) and you can achieve the requred result in VB using ' Dim lnCRC32Result = UInt32.MaxValue'
But VB.NET isn't my first language so there may be some VB related quirk I'm not aware of. IAC, AFAICS, we've established that an unsigned int isn't a good choice since it offers no benefits and may, in some circumstances, be less useful in that (a) it's not CLS compliant and (b) it may not be storable in some databases.
Best,
Viv