Created
February 10, 2015 15:44
-
-
Save ufcpp/a375dff05c33cb837770 to your computer and use it in GitHub Desktop.
multiple return values by out parameters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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