Table of Contents

Class AddStrategy

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

context (int a, int b)

The input data for the algorithm.

Returns

int

The result produced by the algorithm.