如何使用C#在文本框中显示结果

问题描述:

你好,我在我的数据库中有钱数据类型,当我重新获得格式的值(80.0000)。现在我想在这样的文本框中显示这个值(80.00)



我尝试了什么:



i尝试使用字符串格式但不能正常工作

hello i have money datatype in my database when i am retriving the value it comes in format like (80.0000). now i want to display this value in textbox like this(80.00)

What I have tried:

i have tried with string format but not work

txtRate.Text = ds.Tables[0].Rows[0][0].ToString("#,0.00");

转到此处:标准数字格式字符串 [ ^ ]