Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
4
Reply
Help removing unwanted decimal places ???
Waqas Ali
Jul 24 2012 9:12 AM
3.2k
Reply
Hello,
This is my code
decimal averagePrice = (decimal)dvdDS.Tables["manager"].Compute("Avg(Price)", "");
textBox3.Text = Convert.ToString(averagePrice);
I want the textbox to display "averagePrice" upto 3 decimal places.
eg I get: 6.66666666666666666
I want: 6.666
Any help would be appreciated
Thank You
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
4
)
Next Recommended Forum
operator overloading
error provider