Skip to content

Instantly share code, notes, and snippets.

@JohnMGant
Created July 17, 2020 19:45
Show Gist options
  • Select an option

  • Save JohnMGant/39b53f0e25518f0d1e50644c30e51c4e to your computer and use it in GitHub Desktop.

Select an option

Save JohnMGant/39b53f0e25518f0d1e50644c30e51c4e to your computer and use it in GitHub Desktop.
internal class ForEachLoopAdder : IIntegerAdder
{
public int Add(int[] values)
{
int sum = 0;
foreach (var value in values)
{
sum += value;
}
return sum;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment