double d = 1433.9475;
TextBox t = new TextBox();
t.Text = d.ToString("f2");
The "f" stands for fixed-point format and the 2 means two decimal places.
You can find more format specifiers by looking up System.Globalization.NumberFormatInfo.
-Brian
-----Original Message-----
From: Stephen Russell [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 3:30 PM
To: [EMAIL PROTECTED]
Subject: [C#.NET] Display value in a textbox.
I have a price 1911.93 I apply a 25% discount.� Giving me 1433.9475.� How do
I present it in a textbox to a user as 1433.95?
TIA
Stephen Russell
S.R. & Associates
Memphis, TN 38115
901.246-0159
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/CSharpNET/
�
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
�
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/CSharpNET/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
