I learnt about MethodInvoke

When checking for cross-thread calls for GUI applications I've always used the following pattern in the past:

public delegate void SomeDelegate();

public void MethodCall()

{

    if (InvokeRequired)

    {                 BeginInvoke(new SomeDelegate(MethodCall));     }    else

    {

        // Do something

    }

}

I then came across this approach, which saves defining lots of delegates just to perform this. Found it here ... http://jaysonknight.com/blog/archive/2007/02/14/using-anonymous-methods-for-control-invoke-control-begininvoke.aspx.

public void AnotherMethod()

{

    if (InvokeRequired)

    {

        BeginInvoke((MethodInvoker)delegate { AnotherMethod(); });

    }

    else

    {        

        // Do something   

    }

}