CSharpFunctionalExtensions
CSharpFunctionalExtensions copied to clipboard
Result.Combine question
Hi,
Is there a way to use Combine in such a way that a result of Combine contains valueses of two/more results passed into Combine ? Imagine the code below
Result<string> result1 = GetName();
Result<int> result2 = GetAge();
Result.Combine(result1, result2).Bind(nameAndAge => ...)
Can I somehow use Result.Combine
so that nameAndAge
contains valueses of result1
and result2
(as a tuple, anonymous type, etc.) ?
Unfortunately, there's no way to do so at the moment. I'm marking this is a a protentional enhancement, feel free to submit a PR.
@vkhorikov Just found that #342 solves what I was asking about.