Public Class CurrencyConverter
Private summation As Decimal
Private sum As Decimal
Private curryncy As String
Private exchange As Decimal
Private final As Decimal
Public Sub Start()
WriteProgramInfo()
ReadValuesAndSumNumbers()
WriteResult()
End Sub
Private Sub WriteProgramInfo()
Console.WriteLine(vbLf & "++++++ Finnish input type 0 ++++++")
End Sub
Private Sub ReadValuesAndSumNumbers()
Dim done As Boolean = False
summation = 0
Do While (Not done)
Console.Write(vbLf & "What is the number you want: ")
summation = Decimal.Parse(Console.ReadLine())
sum += summation
done = summation = 0
Loop
Console.WriteLine("The sum of it is:" & sum)
Console.Write("Currency name: ")
curryncy = Console.ReadLine()
Console.Write("Enter the exchange rate: ")
Decimal.dTemp = 0
decimal.TryParse(Console.ReadLine(), out dTemp)
exchange = dTemp
final = sum * exchange
End Sub
Private Sub WriteResult()
Console.WriteLine("-------------------------------------------------------")
Console.WriteLine(sum & " converted to " & final & curryncy)
End Sub
End Class
i get this error in this program.
'dTemp' is not a member of 'Decimal'
'out' is not declared. It may be inaccessible due to its protection level
Comma, ')', or a valid expression continuation expected.
'dTemp' is not declared. It may be inaccessible due to its protection level.
yes the dTemp if from c# but i cant figuer out how to change it so it work in vb.net