❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
https://dotnetfiddle.net/uebISh
Line 96. I have a contsraint that says
where TResponse : Result
so I am very confused about this error.
Result.Error("Whatever.");
IS Ardalis.Result.Result type...Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TRespon...
Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse' | Test your C# code online with .NET Fiddle code editor.
10 Replies
show ur code
he posted it as a dotnetfiddle link
looks awful on my phone
Yeah theres a dotfiddle link @feast107
okay so casting it to... itself worked. Still don't understand it though.
state.SetHandled((TResponse)translatedResponse)
https://dotnetfiddle.net/OJrjUD[Fork] Argument 1: cannot convert from 'Ardalis.Result.Result' to '...
[Fork] Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse' | Test your C# code online with .NET Fiddle code editor.
check the type stored in var
@anchy Am I missing something?
Constraint says TResponse is Result. state.SetHandled takes TResponse. Compiler is still confused.
mouseover Result in the constraint
@anchy
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.