I found a switch to .NET 4.6 (from .Net 4.5.2) that delegates declared using lambda expressions that were previously evaluated as static are no longer. Prior to migrating to VS 2015 and .NET 4.6, the next line could evaluate actionMethod.Method.IsStatic to true.
Action<Dispatcher, EventHandler> actionMethod = (d, eh) => d.ShutdownStarted += eh;
With .NET 4.6, actionMethod.Method.IsStatic only ever evaluates to false. Does anyone know why this is?
Marek source
share