换钱 ;右侧的减号

时间:2018-05-03 17:32:15

标签: c#

我不知道为什么减号会转到右侧,我想把减号放在左侧但是idk如何

private void txtPM_TextChanged(object sender, EventArgs e)
{
    string fee = lblFee.Text.Trim();
    string pm = txtPM.Text.Trim();

    decimal number = 0;
    decimal number2 = 0;

    if (!string.IsNullOrWhiteSpace(fee)) number = Convert.ToDecimal(fee);
    if (!string.IsNullOrWhiteSpace(pm)) number2 = Convert.ToDecimal(pm);

    decimal minus = number2 - number;
    txtChange.Text = minus.ToString().Trim();
}

enter image description here

0 个答案:

没有答案