In the following code, I get an "End of statement expected" and "'Text' is not a member of string" errors:
Public Class Form1
Private Sub btnFtoC_Click(sender As Object, e As EventArgs) Handles btnFtoC.Click
Try
Dim f As Decimal CDec(txtF.Text)
Dim c As Decimal
Dim txtC As String
c = 5 / 9 * (f - 32)
txtC.Text = CStr(c)
Catch ex As Exception
End Try
End Sub
End Class
Double(scientific values) and notDecimal(monetary values). - EnigmativityCatch ex As Exception. You should only ever catch specific exceptions, that you can't code your way out of, and that you can meaningfully handle. You should rarely write an exception handler. Too many people use them too often and they just end up creating buggy code. - EnigmativityDim f As Decimal = CDec(txtF.Text)- EnigmativityOption Strict OnandOption Explicit Onwhile coding in VB.NET. They'll make you a better coder. - Enigmativity