-1

每当我尝试此编码时,输入都会更改为 $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

4

1 回答 1

0

我想你可能需要这个:

Dim earn as Decimal = nudHr.Value * 20

如果你的人每小时赚 20 美元

于 2020-06-01T06:33:38.963 回答