Divide Decimal by double : Decimal « Data Type « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main
    

        Dim result As New System.Text.StringBuilder
        Dim maxDecimal As Decimal = Decimal.MaxValue
        Dim sizeOfDecimal As Integer = Runtime.InteropServices.Marshal.SizeOf(maxDecimal.GetType)

        result.Append("Memory size of a Decimal (bytes): ")
        result.AppendLine(sizeOfDecimal)
        result.Append("Maximum value of a Decimal: ")
        result.AppendLine(maxDecimal)
        result.Append("Divided by one million: ")
        result.AppendLine(maxDecimal / 1000000D)
        result.Append("1D / 3D: ")
        result.AppendLine(1D / 3D)

        Console.WriteLine(result.ToString())
     End Sub

End Class
Memory size of a Decimal (bytes): 16
Maximum value of a Decimal: 79228162514264337593543950335
Divided by one million: 79228162514264337593543.950335
1D / 3D: 0.3333333333333333333333333333








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.