UnexplainedWays
asked on
C# Large numbers
I'm trying to do this equastion: http://www.hackingspirits.com/cyb_forensic/fsic_articles/loc_place.html
However i keep getting a "The operation overflows at compile time in checked mode";
All are ok except for 16777216*202. I've tried a few things, like doubles, ints longs and tried to make them unsigned aswell. Is there a way to handle such large numbers?
If there isn't a standard .net way, my guess is i have to create my own class and catch how much overflow there is?
However i keep getting a "The operation overflows at compile time in checked mode";
All are ok except for 16777216*202. I've tried a few things, like doubles, ints longs and tried to make them unsigned aswell. Is there a way to handle such large numbers?
If there isn't a standard .net way, my guess is i have to create my own class and catch how much overflow there is?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
uint bbb = 16777216;
IP_Number = aaa * bbb;
It took the 202 and left it as a normal int.
I tried the m, it turns the numbers into a decimal, and if i turn the origional number into a decimal that works 2.
Thanks.