Gets the Exception object that represents any exception detected during the last call of one of the "EvaluateTo" methods (EvaluateToInputForm, EvaluateToOutputForm, EvaluateToImage, EvaluateToTypeset).
For convenience, the "EvaluateTo" methods don't throw MathLinkException. Instead, they catch any such exceptions and simply return null if one occurred. Sometimes you want to see what the exact exception was when you get back a null result. The LastError property shows you that exception. Typically, it will be a MathLinkException, but there are some other rare cases.