IKernelLinkWaitAndDiscardAnswer Method

Reads and discards all packets from a computation, including the result.

Definition

Namespace: Wolfram.NETLink
Assembly: Wolfram.NETLink (in Wolfram.NETLink.dll) Version: 2.0.0.0
C#
void WaitAndDiscardAnswer()

Remarks

Use this method if you are not interested in the result of a computation. If you are interested in examining the result of the evaluation, use WaitForAnswer instead.

Use this method after sending an expression to evaluate with Evaluate(String) or a manual sequence of Put methods.

Example

C#
ml.Evaluate("Needs[\"Algebra`FiniteFields`\"]");
ml.WaitAndDiscardAnswer();
Examples of packets that arrive and are discarded other than the result are PacketType.Text, PacketType.Message, PacketType.Display, etc. If you want to examine or operate on the incoming packets that are discarded by this method, use the PacketArrived event.

Exceptions

MathLinkExceptionOn any MathLink error.

See Also