|
BitwiseCastToUInt24 Method
|
Performs proper bitwise conversion between signed and unsigned value
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.241-beta+912389e96d98840d2a999d490420db618dcbe4c6
SyntaxPublic Shared Function ToUInt24 (
signedInt As Int24
) As UInt24
GSF.BitwiseCast.ToUInt24 = function(signedInt);
View SourceParameters
- signedInt Int24
- Signed integer that is passed in to be converted to an unsigned integer.
Return Value
UInt24The unsigned integer value.
RemarksThis function is useful because CType(n, UInt24) will throw an OverflowException for values less than zero.
For example, this function correctly converts signed 24-bit integer -8388608 (i.e., Int24.MinValue) to unsigned 24-bit integer 8388608.
See Also