.NET/Link API Version 1.7 USE FRAMES

IMathLink.ComplexType Property

Sets or gets the class that you want to map to Mathematica's Complex numbers.

[Visual Basic]
Property ComplexType As Type
[C#]
System.Type ComplexType {get; set;}

Remarks

After setting ComplexType, you can use GetComplex to read an incoming integer, real, or Complex number as instance of your class, and you can use Put to send objects of your class to Mathematica as Complex.

To be suitable, the Type you specify must have have appropriate members. It must have each of the following:

A constructor with one of these signatures:
    (double re, double im)
    (float re, float im)
A method with one of the following signatures:
    double Re()
    double Real()
    float Re()
    float Real()
OR, a property or field:
    double Re
    double Real
    float Re
    float Real
A method with one of the following signatures:
    double Im()
    double Imag()
    double Imaginary()
    float Im()
    float Imag()
    float Imaginary()
OR, a property or field:
    double Im
    double Imag
    double Imaginary
    float Im
    float Imag
    float Imaginary

Exceptions

Exception Type Condition
ArgumentException If the type does not have appropriate members as described above.

See Also

IMathLink Interface | Wolfram.NETLink Namespace | GetComplex