Simple question: How does this translate to VB.Net
Dispatcher.BeginInvoke(() => listening = false);
listening is a variable on the class (boolean). Converters online didn’t help and what we’ve come up didn’t compile:
Dispatcher.BeginInvoke(Function(listening) listening = False)
Any help would be appreciated.
In a c# lambda like:
the empty parentheses means that the lambda takes no parameters. And since Dispatcher.BeginInvoke takes an Action, having no return value, in VB this would be a
Sub, not aFunction:so you’d have: