Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thousands Separator in C# TextBox ?
Message
From
02/04/2007 10:19:26
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01211171
Message ID:
01211266
Views:
15
.ToString("C") works also.

>I hit this too about a month ago. Look into (Taking Mike's suggestion in to account.):
>
>
>
>decimal somevalue = 1000.00M; // M makes the constant a decimal
>this.MyTextBox.Text = somevalue.ToString("#,##0.00;(#,##0.00)");
>
>
>In the ToString: prior to the first ; is the positive value representation, after it is the negative value representation.
>
>This actually makes for more complex formatting than even VFP.
>
>Richard
>
>
>>Hi,
>>
>>I'm a newbie in C#, from a VFP perspective ... I just want to add thousand separator in Textbox (WinForm App) like in VFP (just put ##,###,### in InputMask property). Can I get this behaviour in C# WinForm ?
>>
>>Oh, one more question ... What is the best data type for Money ?
>>
>>Thanks in advance :-)
Very fitting: http://xkcd.com/386/
Previous
Reply
Map
View

Click here to load this message in the networking platform