c# - Async await in Controller Action: Error: Can not await 'void' -


i using async controller action returns jsonresult. , send notification methods returns void.

public async task<jsonresult> setstatus(string msg) {     await sendnotification(msg); } 

i getting error 'can not await 'void'

your sendnotification has return task, await keyword definition.

it's kind of javascript promise (just give idea), has have done, failed functions, in order able track execution flow of async function.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -