BigNumber.Round Method
Definition
Namespace: Corvus.Numerics
Assembly: Corvus.Text.Json.dll
Source: BigNumber.cs
Round(BigNumber, int, MidpointRounding)
Rounds a value to a specified number of decimal places.
public static BigNumber Round(BigNumber value, int decimals, MidpointRounding mode)
Parameters
| Name | Type | Description |
|---|---|---|
value |
BigNumber |
The value to round. |
decimals |
int |
The number of decimal places. |
mode |
MidpointRounding |
The rounding mode. (optional) |
Returns
The rounded value.
Exceptions
| Exception | Description |
|---|---|
ArgumentOutOfRangeException |
Thrown when decimals is negative. |
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue