4 ms·
Then async comes along and you can't use `out` in async methods :) Thus (anonymous) tuples were introduce so we can do it Go/Rust-style: async Task<(bool,
by Jenk 5y ago
Then async comes along and you can't use `out` in async methods :)
Thus (anonymous) tuples were introduce so we can do it Go/Rust-style:
async Task<(bool, T)> Foo<T>(T value) {
/* do something async like a web request or file read etc. */
var aThing = await GetAThing<T>(value);
return (aThing != null, aThing);
}