Forum Discussion
Mike_Thompson_9
Nimbostratus
Aug 08, 2007CommonULong64 OverflowException
I am trying to convert the CommonULong64 type to UInt64 in .NET for a CommonStatistic type. Sometimes this works fine and I get a good number back. Other times I get a System.OverflowException. The...
Mike_Thompson_9
Nimbostratus
Aug 10, 2007Yeah, Yeah, bang on the VB developer :'( Yes, I know. I do need to drop the VB and move to C at some point, but this app was written in VB so that is what I am going with and what I know (for now). Here are the definitions of the two functions:
CLng http://msdn2.microsoft.com/en-us/library/ck4c5842.aspx
Hex http://msdn2.microsoft.com/en-us/library/8t2d9cx5.aspx
As for efficiency, you are probably correct. However, if there is any slow down the result is trivial in my case.
Basically you are correct. The Hex function returns the number as a hex string, then CLng turns it back in to a Long integer (which is a positive number).
I will keep messing with the code to "optimize" the calculations. If I come up with something better, I will post it. Thanks to both of you for your help..
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects