Class AddStrategy
- Namespace
- WitShells.DesignPatterns.Core
Example strategy that adds two integers together.
public class AddStrategy : IStrategy<(int a, int b), int>
- Inheritance
-
AddStrategy
- Implements
- Inherited Members
Methods
Execute((int a, int b))
Executes the algorithm using the supplied context.
public int Execute((int a, int b) context)
Parameters
Returns
- int
The result produced by the algorithm.