# Double.Round Method

## Definition

Important

Some information relates to prerelease product that may be substantially modified before itâ€™s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

## Overloads

Round(Double) |
Rounds a value to the nearest integer using the default rounding mode (ToEven). |

Round(Double, Int32) |
Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven). |

Round(Double, MidpointRounding) |
Rounds a value to the nearest integer using the specified rounding mode. |

Round(Double, Int32, MidpointRounding) |
Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven). |

## Round(Double)

- Source:
- Double.cs

- Source:
- Double.cs

- Source:
- Double.cs

Rounds a value to the nearest integer using the default rounding mode (ToEven).

```
public:
static double Round(double x) = System::Numerics::IFloatingPoint<double>::Round;
```

`public static double Round (double x);`

`static member Round : double -> double`

`Public Shared Function Round (x As Double) As Double`

#### Parameters

- x
- Double

The value to round.

#### Returns

The result of rounding `x`

to the nearest integer using the default rounding mode.

#### Implements

### Applies to

## Round(Double, Int32)

- Source:
- Double.cs

- Source:
- Double.cs

- Source:
- Double.cs

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

```
public:
static double Round(double x, int digits) = System::Numerics::IFloatingPoint<double>::Round;
```

`public static double Round (double x, int digits);`

`static member Round : double * int -> double`

`Public Shared Function Round (x As Double, digits As Integer) As Double`

#### Parameters

- x
- Double

The value to round.

- digits
- Int32

The number of fractional digits to which `x`

should be rounded.

#### Returns

The result of rounding `x`

to `digits`

fractional-digits using the default rounding mode.

#### Implements

### Applies to

## Round(Double, MidpointRounding)

- Source:
- Double.cs

- Source:
- Double.cs

- Source:
- Double.cs

Rounds a value to the nearest integer using the specified rounding mode.

```
public:
static double Round(double x, MidpointRounding mode) = System::Numerics::IFloatingPoint<double>::Round;
```

`public static double Round (double x, MidpointRounding mode);`

`static member Round : double * MidpointRounding -> double`

`Public Shared Function Round (x As Double, mode As MidpointRounding) As Double`

#### Parameters

- x
- Double

The value to round.

- mode
- MidpointRounding

The mode under which `x`

should be rounded.

#### Returns

The result of rounding `x`

to the nearest integer using `mode`

.

#### Implements

### Applies to

## Round(Double, Int32, MidpointRounding)

- Source:
- Double.cs

- Source:
- Double.cs

- Source:
- Double.cs

Rounds a value to a specified number of fractional-digits using the default rounding mode (ToEven).

```
public:
static double Round(double x, int digits, MidpointRounding mode) = System::Numerics::IFloatingPoint<double>::Round;
```

`public static double Round (double x, int digits, MidpointRounding mode);`

`static member Round : double * int * MidpointRounding -> double`

`Public Shared Function Round (x As Double, digits As Integer, mode As MidpointRounding) As Double`

#### Parameters

- x
- Double

The value to round.

- digits
- Int32

The number of fractional digits to which `x`

should be rounded.

- mode
- MidpointRounding

The mode under which `x`

should be rounded.

#### Returns

The result of rounding `x`

to `digits`

fractional-digits using `mode`

.