Can anyone advise why this line of code would not compile? It generates CS1660 instead:
s.run_button.Invoke((b) => { b.Enabled = false; },
new object[] { s.run_button });
Visual studio says: Cannot convert lambda expression to type ‘System.Delegate’ because it is not a delegate type
Lambda expressions by themselves have no type and are not convertible to
System.Delegate. TheInvokemethod has the typeSystem.Delegateand hence it won’t compile because the lambda expression has no type. You need to provide an explicit type conversion here