Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
multiple return values by a declared transport type
public struct TallyResult { public int Sum; public int Count; }
public TallyResult Tally(IEnumerable<int> values) { ... }
var t = Tally(myValues);
Console.WriteLine($"Sum: {t.Sum}, count: {t.Count}");
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.