[]
Returns the number nearest the specified value.
public static decimal Round(decimal value, int digits)
| Type | Name | Description |
|---|---|---|
| decimal | value | A decimal number to be rounded. |
| int | digits | The number of significant fractional digits (precision) in the return value. |
| Type | Description |
|---|---|
| decimal | The number nearest value with precision equal to decimals. |
To make a round mathematic operation for float type number
public static int Round(float paraNum)
| Type | Name | Description |
|---|---|---|
| float | paraNum | A float number to be rounded. |
| Type | Description |
|---|---|
| int | The number nearest value with precision equal to float. |
To make a round mathematic operation for double type number.
public static int Round(double paraNum)
| Type | Name | Description |
|---|---|---|
| double | paraNum | A double number to be rounded. |
| Type | Description |
|---|---|
| int | The number nearest value with precision equal to double. |