Convert.ToInt32 (Decimal) converts decimal number to 32-bit signed integer.
Module Example
Public Sub Main()
Dim values() As Decimal = { Decimal.MinValue, -1034.23d, -12d, 0d, 147d, _
199.55d, 9214.16d, Decimal.MaxValue }
Dim result As Integer
For Each value As Decimal In values
Try
result = Convert.ToInt32(value)
Console.WriteLine(result)
Catch e As OverflowException
Console.WriteLine("OverflowException")
End Try
Next
End Sub
End Module
Related examples in the same category