Converts Decimal numbers to UInt32 values using the explicit Decimal to UInt32 conversion. : Decimal « Data Type « VB.Net Tutorial






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








2.12.Decimal
2.12.1.Decimal.Compare
2.12.2.Decimal.Divide
2.12.3.Decimal.Floor
2.12.4.Decimal.GetBits
2.12.5.Decmimal calculation
2.12.6.Divide Decimal by double
2.12.7.MinValue and MaxValue of Decimal
2.12.8.Do calculation between Integer and Decimal
2.12.9.Converts Decimal numbers to UInt32 values using the explicit Decimal to UInt32 conversion.
2.12.10.Converts Decimal numbers to SByte values using the explicit Decimal to SByte conversion.