.NET Framework Developer Center > .NET Development Forums > Common Language Runtime > Why Marshal's GetDelegateForFunctionPointer does not accept generic type delegates such as Func<int, int>?
Ask a questionAsk a question
 

AnswerWhy Marshal's GetDelegateForFunctionPointer does not accept generic type delegates such as Func<int, int>?

Answers

  • Wednesday, November 11, 2009 2:44 AMeryangMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi,
    This restriction is caused by some technical difficulities, and the product team will do their best to improve it in future releases.
    Currently, as it is documented, we’d better avoid using generics in that method.

    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.

All Replies