In some cases, a Lambda expression is implicitly converted to delegates. In particular, if a method expects a Delegate type, you must first explicitly specify lambda for the compiler to accept it.
What you can do is explicitly pour lambda, which should allow you to use BeginInvoke :
lvMyAssignments.Dispatcher.BeginInvoke( (Action)(() => { lvMyAssignments.ItemsSource = e.HandOverDocs; }));
Usually, if you have a method with a strongly typed delegate signature, for example:
public static void BeginInvoke( Action d ) { ... }
The compiler can convert the lambda expression to the corresponding delegate signature. But if the method is poorly printed:
public static void BeginInvoke( Delegate d ) { ... }
the compiler will not accept lambda. However, you can apply the lambda expression to a specific delegate subscription (such as Action), and then pass this to the method. The compiler cannot automatically do this for you, because there are many different types of delegates that might be a valid match for a lambda signature ... and the compiler does not know what will be right.
Lbushkin
source share