Search code examples
vb.netdispatcher

Writing the Dispatcher.Invoke VB.NET


Im just trying to figure out the syntax for a Dispatcher.Invoke in vb.net. I have it working in a C# application, but now i need the VB form. Here is the code i have for my C# application

 this.Dispatcher.Invoke((Action)(() =>
        {
            SOME CODE
        }));

All online sources seem to be C#, so any help would be appreciated. Thanks.


Solution

  • Dispatcher.Invoke(Sub()
    
       ' CODE 
    
      End Sub)