Table of Contents

IRoundingStrategy Interface

Definition

Namespace
Bodu.Financial
Assembly
Bodu.Financial.dll
Package
Bodu.Financial 1.0.0
Source
IRoundingStrategy.cs

Rounds a raw monetary amount to a given number of fractional digits. Implementations encapsulate the rounding convention applied at operation boundaries - banker's rounding, away-from-zero, and so on.

public interface IRoundingStrategy
Extension Methods

Methods

Round(decimal, int)

Rounds value to scale fractional digits.

decimal Round(decimal value, int scale)

Parameters

value decimal

The raw amount to round.

scale int

The number of fractional digits to round to.

Returns

decimal

The rounded amount.

Applies to

ProductVersions
.NET8, 10