I am new to Winforms development and I going to be displaying data to my users in a textbox. The textbox will be databound with data that is currency so I am trying to Format the value that is being displayed.
I looked at a Masked Text Box but that isn't exactly what I am looking for because it doesn't put the cents after the decimal.
Do I need to code for each textbox similar to this?
TextBox.Text = DataSet.DataView[0].Amount.ToString("c");
I have alot of textboxes that need to be formatted so I am wondering if I need to do this for each one. Does anyone have any suggestions?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…