Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting numeric strings
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00873944
Message ID:
00874052
Views:
8
This message has been marked as the solution to the initial question of the thread.
You are calling the Object.ToString method which has no overload with one parameter. First you must cast the object to whatever type it is, then call the ToString method.

For example, if it is a decimal, then try this:

this.dollarString = ((decimal)(ds.Tables[0].Rows[0][0])).ToString("C");


>This works fine, but if I try to change to:
>
>this.dollarString = ds.Tables[0].Rows[0][0].ToString("C");
>
>I get the error:
>
>No overload for method 'ToString' takes '1' arguments
>
>How do I format the numeric value in the DataSet to display in currency format?
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform