Skip to content

This extension facilitates the calculation of both simple interest and compound interest.

License

Notifications You must be signed in to change notification settings

louresb/InterestExtensions

Repository files navigation

InterestExtensions

NuGet Version NuGet Downloads License Development Status

This extension facilitates the calculation of both simple interest and compound interest.

Usage Examples

Here are some examples of how to use the extension:

decimal principal = 100;
decimal interestRate = 0.004m;
int period = 7;

// Calculate simple interest
decimal simpleInterest = principal.CalculateSimpleInterest(interestRate, period);
Console.WriteLine($"Simple interest: {simpleInterest}");

// Calculate compound interest
decimal compoundInterest = principal.CalculateCompoundInterest(interestRate, period);
Console.WriteLine($"Compound interest: {compoundInterest}"); 

Installation

To install the package via NuGet, you can use the following command:

dotnet add package InterestExtensions

You can also visit the NuGet package page for more information and to download the package.

Contribution

Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

MIT License © Bruno Loures

Credits Icon - Freepik - Flaticon

About

This extension facilitates the calculation of both simple interest and compound interest.

Topics

Resources

License

Stars

Watchers

Forks

Languages