Click or drag to resize

BitwiseCast.ToUInt32 Method

Performs proper bitwise conversion between signed and unsigned value

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.246-beta+ff392465a0262ee2737937d4127fc3c2f08c6dcd
Syntax
public static uint ToUInt32(
	int signedInt
)
View Source

Parameters

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

Return Value

UInt32
The unsigned integer value.
Remarks

This function is useful because Convert.ToUInt32 will throw an OverflowException for values less than zero.

For example, this function correctly converts signed 32-bit integer -2147483648 (i.e., Int32.MinValue) to unsigned 32-bit integer 2147483648.

See Also