Search
Articles
FAQs
Login
All Questions
New Question
C# .NET - String.Format
Asked By
Stephen
on 17-May-13 12:52 AM
Dear Friends,
I have Values like
1,000
25,000
500,000
Need to convert this values without comma like
1000
25000
500000
How to acheive this in C#?
Thanks in Advance,
Stephen.L
Robbe Morris
replied to
Stephen
on 17-May-13 07:44 AM
You use the .ToString() method and apply the number format you need.
Try this .ToString("###");
But, this works on variables that are numbers. int, double, etc.
What is your variable type? a string?
Bernard Gille
replied to
Robbe Morris
on 17-May-13 10:44 AM
string newValue = oldValue.Replace(",","");