This project has moved. For the latest updates, please go here.

await not working for me

May 18, 2014 at 6:33 AM
Greetings,

When following the instructions from the documentation page, VS2013 tells me that I cannot use await with a function that is not marked as async. I tried installing the DLL from: NuGet, direct download from CodePlex, and from compiling the code and in all instances none of the methods (brick.ConnectAsync, TurnMotorAtPowerAsync, etc) are marked as async.

Methods do indeed return a Task but that doesn't seem enough.

Could someone please provide me with some clarifications here? Am I doing something wrong or is the documentation our of sync with the actual code?

Thanks.
Coordinator
May 18, 2014 at 6:40 AM
Is your own method in which you're using await marked async?
May 18, 2014 at 6:50 AM
Thank you for being so quick at replying. I didn't think of that. Now it works as expected (plus I got to read MS's documentation about await/async)