我知道这很简单,但在Leave事件的文本框中格式化数字需要一些帮助。我正在尝试以下但我得到的结果不正确。
这就是我所期待的:
100 = 100
1000 = 1,000
10000 = 10,000
10000.25 = 10,000.25
2500000.432 = 2,500,000.432
txtAmount.Text = string.Format(System.Globalization.CultureInfo.GetCultureInfo("id-ID"), "{0:#,##0.##}", double.Parse(txtAmount.Text));