A better way to wait for a variable to change state in VB.Net

后端 未结 2 412
悲哀的现实
悲哀的现实 2021-01-23 19:27

I have a loop that goes through a number of values. With every value iterated, a page is loaded in a webbrowser control (with the value passed as a parameter) and when the page

2条回答
  •  误落风尘
    2021-01-23 19:36

    I've recently answered a similar question. The solution is in C#, but you can use Async/Await in VB.NET in a very similar way. Using this technique, you would get a natural flow of execution for your code (DocumentComplete event is encapsulated as Task).

提交回复
热议问题