.NET/Link API Version 1.7 USE FRAMES

IKernelLink.GetObject Method 

Reads any single expression off the link and returns an appropriate object. Overrides the IMathLink version to allow you to read NETObject expressions.

[Visual Basic]
Function GetObject() As Object
[C#]
object GetObject();

Remarks

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 expressionRead as:
IntegerInt32
RealDouble
True or FalseBoolean
Nullnull
String or SymbolString
Complex numberComplex type
FunctionArray
NETObjectthe .NET object it refers to
This behavior is exactly like the version in the IMathLink interface except that it addds the ability to read NETObject expressions as the objects they refer to. In other words, you can read .NET objects sent from Mathematica.

You must call EnableObjectReferences before you can send or receive object references.

Exceptions

Exception Type Condition
MathLinkException If the waiting data cannot be read in this format, or on any other MathLink error.

See Also

IKernelLink Interface | Wolfram.NETLink Namespace | EnableObjectReferences | GetNextExpressionType | GetExpressionType | PutReference