Forum Discussion

Mike_Thompson_9's avatar
Mike_Thompson_9
Icon for Nimbostratus rankNimbostratus
Aug 08, 2007

CommonULong64 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 CommonULong64 value going in has a high of 4 and a low of -176378626 which does not look right, but that is what is coming back from the SOAP call. Here is my converstion function:

 

 

Public Shared Function Build64(ByVal value As Object) As UInt64

 

Return Convert.ToUInt64(value.high << 32 Or value.low)

 

End Function

 

 

Any ideas?

20 Replies