<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="https://stackoverflow.com/questions/164926/c-sharp-how-do-i-round-a-decimal-value-to-2-decimal-places-for-output-on-a-pa">c# - How do I round a decimal value to 2 decimal places (for output on a page)</a>  </p>
</blockquote>



<p>I want to truncate the decimals like below</p>

<p>i.e.</p>

<ul>
<li>2.22939393 -> 2.229</li>
<li>2.22977777 -> 2.229</li>
</ul>

You can use
Math.Round
:
```
```
decimal rounded = Math.Round(2.22939393, 3); //Returns 2.229
```
```
Or you can use ToString with the N3
numeric format
.
```
```
string roundedNumber = number.ToString("N3");
```
```
EDIT:
Since you don't want rounding, you can easily use
Math.Truncate
:
```
```
Math.Truncate(2.22977777 * 1000) / 1000; //Returns 2.229
```
```