3 ms·
With C# 7 out vars are IMO actually now much more ergonomic to use than tuple returns. if (TryGetSomething(int param, out var value)) { // use it here
by paavohtl 9y ago
With C# 7 out vars are IMO actually now much more ergonomic to use than tuple returns.
if (TryGetSomething(int param, out var value)) {
// use it here
}
If you returned a tuple you'd have to destructure both variables, and have a separate line for the if and the declaration.