mardi 9 mai 2017

Delegate does not contain a definition for CreateDelegate in .net core

I'm trying to use delegates for reflection in dotNet core web application. Below is the sample of the code.

Action action = (Action) Delegate.CreateDelegate(typeof(Action), method)

Compiler gives the following error:

'Delegate' does not contain a definition for 'CreateDelegate'   ConsoleApp2..NETCoreApp,Version=v1.0'

Is there any work around for creating delegates in .net Core?





Aucun commentaire:

Enregistrer un commentaire