NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Convert.ToInt32 (Decimal)

Converts a Decimal to an Int32.

[Visual Basic]
Overloads Public Shared Function ToInt32( _
   ByVal value As Decimal _
) As Integer
[C#]
public static int ToInt32(
   Decimal value
);
[C++]
public: static int ToInt32(
   Decimal value
);
[JScript]
public static function ToInt32(
   value : Decimal
) : int;

Parameters

value
The number to be converted.

Return Value

value rounded to the nearest integer. If value is exactly halfway between two whole numbers, this method returns the the integer that is even (i.e. 4.5 is converted to 4, and 5.5 is converted to 6).

Exceptions

Exception Type Condition
OverflowException is thrown if value is greater than Int32.MaxValue or less than Int32.MinValue.

See Also

Convert Class | Convert Members | System Namespace | Convert.ToInt32 Overload List