Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Created February 10, 2015 18:07
Show Gist options
  • Save ufcpp/8a21e508fbf547cc795b to your computer and use it in GitHub Desktop.
Save ufcpp/8a21e508fbf547cc795b to your computer and use it in GitHub Desktop.
Tuple members in a method body, no return statement
public (int sum, int count) Tally(IEnumerable<int> values)
{
sum = 0; count = 0;
foreach (var value in values) { sum += value; count++; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment