C
C#5mo ago
Natashi

✅ CSharpFunctionalExtensions.Result implicit conversion

Why does C# not allow implicit conversion in this case even though CSharpFunctionalExtensions.Result contains an implicit operator Result<T, E>(T value)?
No description
3 Replies
Angius
Angius5mo ago
Variance perhaps? Whenever there's an issue casting generic types to eachother, it's probably covariance or contravariance
reflectronic
reflectronic5mo ago
C# does not allow user-defined conversions to or from interfaces
Natashi
NatashiOP5mo ago
Damnit, that's annoying, thanks for the answer

Did you find this page helpful?