|
BitwiseCastToUInt64 Method
|
Performs proper bitwise conversion between signed and unsigned value
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntaxpublic static ulong ToUInt64(
long signedInt
)
Public Shared Function ToUInt64 (
signedInt As Long
) As ULong
GSF.BitwiseCast.ToUInt64 = function(signedInt);
View SourceParameters
- signedInt Int64
- Signed integer that is passed in to be converted to an unsigned long.
Return Value
UInt64The unsigned long value.
RemarksThis function is useful because Convert.ToUInt64 will throw an OverflowException for values less than zero.
For example, this function correctly converts signed 64-bit integer -9223372036854775808 (i.e., Int64.MinValue) to unsigned 64-bit integer 9223372036854775808.
See Also