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






Option Strict On

Module Main
    Public Sub DecimalToS_Byte(argument As Decimal)
        Console.WriteLine(argument)
        
        Dim sByteValue As Object

        Try
            sByteValue = CByte(argument)
        Catch ex As Exception
            sByteValue = ex.GetType().Name
        End Try

        Console.WriteLine(sbyteValue)

    End Sub

    Public Sub Main( )
        DecimalToS_Byte(8d)
        DecimalToS_Byte(New Decimal(7, 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.