अंग्रेज़ी में पढ़ें संपादित करें

इसके माध्यम से साझा किया गया


Double.Round Method

Definition

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);

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

.NET 9 और अन्य संस्करण
उत्पाद संस्करण
.NET 7, 8, 9

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);

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

.NET 9 और अन्य संस्करण
उत्पाद संस्करण
.NET 7, 8, 9

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);

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

.NET 9 और अन्य संस्करण
उत्पाद संस्करण
.NET 7, 8, 9

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);

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.

Implements

Applies to

.NET 9 और अन्य संस्करण
उत्पाद संस्करण
.NET 7, 8, 9