C# Decimal ToUInt32
Description
Decimal ToUInt32
converts the value of the specified
Decimal to the equivalent 32-bit unsigned integer.
Syntax
Decimal.ToUInt32
has the following syntax.
[CLSCompliantAttribute(false)]
public static uint ToUInt32(
decimal d
)
Parameters
Decimal.ToUInt32
has the following parameters.
d
- The decimal number to convert.
Returns
Decimal.ToUInt32
method returns A 32-bit unsigned integer equivalent to the value of d.
Example
The following example uses the ToUInt32 method to convert decimal numbers to UInt32 values.
//from w w w.j a v a 2 s. c o m
using System;
class Example
{
public static void Main( )
{
uint number = Decimal.ToUInt32(123.999m);
Console.WriteLine(number);
}
}
The code above generates the following result.