TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
698
1.3k
217.6k
How to keep any decimal number after aritmetic operations
Aug 24 2018 4:21 PM
Hi,
I have a serious problem. I do make any aritmetic operations and it's work very well. But the problem is on any aritmetic operations for example 135,54 + 18,55 = 154,09
txtNumber1 = 135,54
txtNumber2 = 18,35
txtResNumber = 154,89
Now in practice:
double d1, d2, total;
double.TryParse(
txtNumber1
.Text, out d1);
double.TryParse(
txtNumber2
.Text, out d2);
total = d1 + d2;
txtResNumber
.Text = total.ToString("N2");
Then the result show every time
154,00
never show the real result as
154,89
I need a good solution to resolv it please.
Thank you,
Israel.
Reply
Answers (
5
)
Remove Datetime By query to show inLabel or Textbox
how to insert the data into table in storedprocedure