VB.Net/Language Basics/Decimal
Convert String to Decimal
<source lang="vbnet"> Imports System
Public Class MainClass
Shared Sub Main() Dim cdeg As Decimal Console.Write("Enter the degrees in centigrade...") cdeg = CDec(Console.ReadLine()) Dim fdeg As Decimal fdeg = (((9@ / 5) * cdeg) + 32) Console.WriteLine(cdeg & " is " & fdeg & " degrees Fahrenheit.") End Sub
End Class
</source>