DefineNETDelegate

DefineNETDelegate[name, rtype, ptypes]
creates a new .NET delegate type with the given name name, return type rtype, and parameter types ptypes.

DetailsDetails

  • To use DefineNETDelegate, you first need to load .NET/Link using Needs["NETLink`"].
  • The main use of this function is to create delegates for DLL function pointers. In such cases, there is typically not a suitable existing .NET delegate type, so one needs to be created.
  • DefineNETDelegate simply lets you do this entirely in Mathematica code, without resorting to writing in C# or Visual Basic.
  • After defining a delegate type, NETNewDelegate is used to create a new instance of the delegate.
New to Mathematica? Find your learning path »
Have a question? Ask support »