Skip to content

Instantly share code, notes, and snippets.

@ufcpp
Created February 10, 2015 15:56
Show Gist options
  • Save ufcpp/3b16d551fd4baf83b6bb to your computer and use it in GitHub Desktop.
Save ufcpp/3b16d551fd4baf83b6bb to your computer and use it in GitHub Desktop.
multiple return values by the System.Tuple class
public Tuple<int, int> Tally(IEnumerable<int> values) { ... }
var t = Tally(myValues);
Console.WriteLine($"Sum: {t.Item1}, count: {t.Item2}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment