Hi Amichai, I have a problem when trying to wrap an IEnumerable to an ErrorOr<IEnumerable>:
using ErrorOr;
class Foo {
public ErrorOr<IEnumerable<int>> wrap() {
IEnumerable<int> nums = new List<int>(){ 1, 2 };
return nums;
}
}
VSCode gives me an error:
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<int>' to 'ErrorOr.ErrorOr<System.Collections.Generic.IEnumerable<int>>' [BuberDinner.Api]csharp(CS0029)
No quick fixes available
I find a workaround: changes IEnumerable<int> tools to List<int> tools:
using ErrorOr;
class Foo {
public ErrorOr<IEnumerable<int>> wrap() {
List<int> nums = new List<int>(){ 1, 2 };
return nums;
}
}
Hi Amichai, I have a problem when trying to wrap an
IEnumerableto anErrorOr<IEnumerable>:VSCode gives me an error:
I find a workaround: changes
IEnumerable<int> toolstoList<int> tools: