Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
multiple return values by out parameters
public void Tally(IEnumerable<int> values, out int sum, out int count) { ... }
int s, c;
Tally(myValues, out s, out c);
Console.WriteLine($"Sum: {s}, count: {c}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.