Module DecimalToU_Int32Demo
Public Sub DecimalToU_Int32(argument As Decimal)
Dim Int32Value As Object
Dim UInt32Value As Object
Try
Int32Value = CInt(argument)
Catch ex As Exception
Int32Value = ex.GetType().Name
End Try
Try
UInt32Value = CUInt(argument)
Catch ex As Exception
UInt32Value = ex.GetType().Name
End Try
Console.WriteLine(Int32Value)
Console.WriteLine(UInt32Value)
End Sub
Public Sub Main( )
DecimalToU_Int32( 123d)
DecimalToU_Int32(New Decimal(123000, 0, 0, False, 3))
End Sub
End Module