Decimal Constructor (Single)
Imports System
Imports Microsoft.VisualBasic
Module DecimalCtorSDemo
Sub CreateDecimal(ByVal value As Single, ByVal valToStr As String)
Console.Write("{0,-27}", String.Format("Decimal( {0} )", valToStr))
Try
Dim decimalNum As New Decimal(value)
Console.WriteLine("{0,31}", decimalNum)
Catch ex As Exception
Console.WriteLine(ex)
End Try
End Sub
Sub Main()
CreateDecimal(123450.0, "1.2345E+5")
End Sub
End Module
Related examples in the same category