Click or drag to resize

BitwiseCastToUInt24 Method

Performs proper bitwise conversion between signed and unsigned value

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.250-beta+e1aac152bf9c38c67035c6d283461f222e39e02a
Syntax
public static UInt24 ToUInt24(
	Int24 signedInt
)
View Source

Parameters

signedInt  Int24
Signed integer that is passed in to be converted to an unsigned integer.

Return Value

UInt24
The unsigned integer value.
Remarks

This 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