Strange Async Warning in VS 2013

余生颓废 提交于 2019-12-13 06:53:15

问题


I have a Button on a UserControl.

I'm marking the UserControl's Click event handler for the Button as Async, so I can run an asynchronous method from inside it. I have to do it this way, otherwise the UI blocks and a ToolStripLabel on the Form doesn't get updated before the SchedulerNode.Load() method is called.

Visual Studio isn't liking it very much, but the warning it's returning seems both incorrect and misapplied.

Here's the code:

And here's the warning:

Note that VS indicates the correct line number but the wrong file (the designer code). And according to the warning I should make it an Async Sub... but it already is.

It looks like this may be a bug in the IDE. Can anyone else confirm?

来源:https://stackoverflow.com/questions/28524372/strange-async-warning-in-vs-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!