❔ await nullable return values
I have a function returning a nullable class. The compiler complains at the await line it cannot implicity perform the conversion even though they are both the same type.
10 Replies
So you return a
Task<T>?
?
Why?
Why not Task<T?>
?uh
await
ing strips the Task
awayThe return type is derived from EventArgs
args
will be of type MyEventArgs?
Not Task<MyEventArgs?>
Trying now. . .
or use
var
That's the easy way out, yeah lol
Thank you 😄 😄 😄 that worked. I need to not that await strips the task out.
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.