Sign in to follow this  

convert this C# code to VB

Recommended Posts

Shane Ekanayake    60

can anyone convert this C# code to VB. thanx

this.Invoke((MethodInvoker)(() => { timer3.Enabled = true; }))

Share this post


Link to post
Share on other sites
AnDom    14

Really had to work off one line of code... you are trying to convert anonymous delegates in C# into VB... which will only work in later version of VB.

Share this post


Link to post
Share on other sites
Eric    1,514

It should be

Me.Invoke(New MethodInvoker(
Sub()
  timer3.Enabled = True
End Sub))

  • Like 2

Share this post


Link to post
Share on other sites
Shane Ekanayake    60

It should be

Me.Invoke(New MethodInvoker(
Sub()
  timer3.Enabled = True
End Sub))

this worked perfectly thanx :-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.