471,306 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

C# Windows Form Globalization format problem

Hi,

I have a TextBox txtNumber which uses the CultureInfo( "en-US",
false ).NumberFormat,
so the txtNumber looks like "1,234,567.00".
Now my problem is how do I retrieve the value of the txtNumber so it will be
"1234567" and not "1,234,567.00".
Thanks for help.
Jason
Jan 16 '06 #1
1 1441
Jason Huang wrote:
I have a TextBox txtNumber which uses the CultureInfo( "en-US",
false ).NumberFormat,
so the txtNumber looks like "1,234,567.00".
Now my problem is how do I retrieve the value of the txtNumber so it will be
"1234567" and not "1,234,567.00".


I'm not entirely sure I understand exactly where the problem is. Do you
have an int (or double, or decimal) and want to convert to a string
without the thousands separator, or do you have a string and wish to
parse it to an int/double/decimal/etc, or do you have a string and wish
to convert it to another string?

Could you produce a short but complete program which demonstrates the
problem?

Jon

Jan 16 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ChainsawDude | last post: by
11 posts views Thread by Cor Ligthert | last post: by
3 posts views Thread by Mika M | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.