Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRC32 returns negative on big files
Message
From
31/07/2011 11:59:14
 
 
To
31/07/2011 11:39:36
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01519635
Message ID:
01519750
Views:
22
>>>(1) The short way is to cast the return result to UInteger, and change the return type of GetCrc32() to UInteger
>>
>>IIRC you can't do that cast in VB (although you can in C# using 'unchecked')
>
>
>Viv,
>
>I don't know, but I'd be very surprised if it weren't possible

Just tried this which won't compile:
Dim test As UInteger = DirectCast(Int32.MaxValue, UInteger)
If it was a valid cast what resulting UInteger would you expect from a negative value signed int ?
In C#:
unchecked { UInt32 test = ((UInt32)Int32.MinValue); }
yields 2147483648....
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform