.NET/Link API Version 1.5 USE FRAMES

IMathLink.PeekExpr Method 

Creates an Expr from the current expression, but does not drain it off the link.

[Visual Basic]
Function PeekExpr() As Expr
[C#]
Expr PeekExpr();

Remarks

This method is like GetExpr, but PeekExpr does not actually remove anything from the link. In other words, it leaves the link in the same state it was in before PeekExpr was called. It is useful for examining the next expression on the link without actually consuming it. That means you can insert a line like this in your program without disturbing your other code for reading the data:

Console.WriteLine("The next expression is: " + ml.PeekExpr());

Exceptions

Exception Type Condition
MathLinkException On any MathLink error.

See Also

IMathLink Interface | Wolfram.NETLink Namespace | Expr | GetExpr