IKernelLinkPutReference Method
Sends an object to the Wolfram Language "by reference".
Use this method to pass .NET objects to your Wolfram session so that methods can be invoked directly
from Wolfram Language code as described in Part 1 of the .NET/Link User Guide.
Objects sent to Wolfram using this method arrive as NETObject expressions.
You must call
EnableObjectReferences before PutReference will function properly.
The Put method (inherited from IMathLink) will also send some objects by reference,
but there are three reasons to call PutReference instead:
-
You want to force an object that would normally be sent by value (for example, a string) to be sent by reference.
-
You know that the object is a type that Put would send by reference, but you think it makes your code clearer
to call PutReference explicitly.
-
You want to control the type by which the object is seen as in the Wolfram Language.