Mono Class Library: System.Convert Overview | Members

System.Convert.ToUInt32 Method

Converts a decimal to a uint . [Edit]

[System.CLSCompliant(false)]
public static uint ToUInt32 (decimal value)

Parameters

value
The decimal value to be converted. [Edit]

Returns

value as a 32-bit unsigned integer. value is rounded prior to conversion. [Edit]

Exceptions

TypeReason
OverflowExceptionvalue is greater than uint.MaxValue or less than uint.MinValue. [Edit]

Remarks

Prior to the conversion, if value is halfway between two whole numbers, it is rounded to the nearest even integer. For example, 4.5 is rounded to 4, and 5.5 is rounded to 6.

This member is not CLS-compliant. For a CLS-compliant alternative, use Convert.ToInt64(object)(decimal).

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0