Converts a Currency to an Int32.
[Visual Basic] Public Shared Function ToInt32( _ ByVal c As Currency _ ) As Integer [C#] public static int ToInt32( Currency c ); [C++] public: static int ToInt32( Currency c ); [JScript] public static function ToInt32( c : Currency ) : int;
The result of converting the Currency value to an integer.
Exception Type | Condition |
---|---|
OverflowException | If the Currency value is outside the acceptable range. |
The ToInt32 method converts a Currency value to a int (Int32) value. The Currency value is rounded towards zero to the nearest integer value, and the result of this operation is returned as an integer.
An overflow exception is thrown if the resulting Currency value is less than MinValue or greater than MaxValue.