![]() |
Calculator Application with Library 2.1.2
A simple library for performing basic arithmetic operations with application
|
Performs basic arithmetic operations on integers. More...
Public Member Functions | |
| int | Add (int a, int b) |
| Adds two integers. | |
| int | Subtract (int a, int b) |
| Subtracts one integer from another. | |
| int | Multiply (int a, int b) |
| Multiplies two integers. | |
| int | Divide (int a, int b) |
| Divides one integer by another using integer (truncating) division. | |
Performs basic arithmetic operations on integers.
This is the sample class the template ships with. When you start your own project, replace it (and CalculatorCli) with your own domain classes — see docs/guide/from-topic-to-project.en.md for the step-by-step walkthrough.
Definition at line 11 of file Calculator.cs.
| int CalculatorLibrary.Calculator.Add | ( | int | a, |
| int | b | ||
| ) |
Adds two integers.
| a | The first addend. |
| b | The second addend. |
Definition at line 16 of file Calculator.cs.
| int CalculatorLibrary.Calculator.Divide | ( | int | a, |
| int | b | ||
| ) |
Divides one integer by another using integer (truncating) division.
| a | The dividend. |
| b | The divisor. |
| DivideByZeroException | Thrown when b is zero. |
Definition at line 41 of file Calculator.cs.
| int CalculatorLibrary.Calculator.Multiply | ( | int | a, |
| int | b | ||
| ) |
Multiplies two integers.
| a | The first factor. |
| b | The second factor. |
Definition at line 32 of file Calculator.cs.
| int CalculatorLibrary.Calculator.Subtract | ( | int | a, |
| int | b | ||
| ) |
Subtracts one integer from another.
| a | The value to subtract from. |
| b | The value to subtract. |
Definition at line 24 of file Calculator.cs.