user2818430 - 2 years ago 108

C# Question

I have a decimal number: 12.4465463455

`decimal value = 12.4465463455m;`

How can I round this decimal and remove extra decimals but 2 so the decimal will be

`12.45`

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

Just use `Math.Round`

, so:

```
decimal value = 12.4465463455m;
decimal value2dp = Math.Round(value, 2); //2 => 2 decimal places
```

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**