Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Why can an AsyncEventHandler method return void or Task?

$
0
0

Blazor has a callback AsyncEventHandler struct that is used for declaring events in a component. Here’s a useful discussion about how to get called by the event.

I’ve found that the method assigned to an AsyncEventHandler can return void or Task. How can it return void when it’s declared to return Task. Does the system view a return of void being a Task that has completed?

And I’m talking here of a method that returns void, not “async void”. So a truly synchronous method.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>