Reads any single expression off the link and returns an appropriate object. Overrides the IMathLink version to allow you to read NETObject expressions.
This method works to read any expression that has a "natural" mapping into a .NET type. The following table shows how expressions are read:
Incoming Mathematica expression | Read as: |
---|---|
Integer | Int32 |
Real | Double |
True or False | Boolean |
Null | null |
String or Symbol | String |
Complex number | Complex type |
Function | Array |
NETObject | the .NET object it refers to |
You must call EnableObjectReferences before you can send or receive object references.
Exception Type | Condition |
---|---|
MathLinkException | If the waiting data cannot be read in this format, or on any other MathLink error. |
IKernelLink Interface | Wolfram.NETLink Namespace | EnableObjectReferences | GetNextExpressionType | GetExpressionType | PutReference