每当我尝试此编码时,输入都会更改为 $0.00:
Private Sub btnEnt_Click(sender As Object, e As EventArgs) Handles btnEnt.Click
Dim result As String
Dim earn As Decimal
txtEarning.Text = earn.ToString("C")
result = txtFName.Text & " " & txtLName.Text & " Worked" & vbCrLf
result &= nudHr.Value & " Hrs today"
result &= " and his earning is " & txtEarning.Text
txtRes.Text = result
End Sub
该值不显示输入值,而是自动转换为 $0.00