Users Pricing

forum

Round double type variable to two decimal places in C#.

Anupam Mishra 2101 15 Jan 2016
Hi all,
I m rounding values using below code:
double _total =100.0056;
 its displaying as 100.0056 instead of 100.01  i m trying to round up for 2 decimal places but its not working.. same problem occurs when i use Datatype as  Decimal.. how can i round up exactly.
thank you.

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md