C++/CLI delegate as function pointer (System.AccessViolationException)
问题 I have been experimenting with C++/CLI delegates (as I am trying to make a .NET reference library), and I have been having the following problem. I define a delegate in C++/CLI, and then create an instance of the delegate in C#, and then call the instance of the delegate through unmanaged C++ via a function pointer. This all works as expected. Code to illustrate this (first my C#) using System; namespace TestProgram { class Program { static void Main(string[] args) { Library.Test