How to serialize 'System.Numerics.Complex' using an XmlSerializer?

Takamaka

New Member
This is the XML output I get when a \[code\]Complex[]\[/code\] object is serialized:\[code\]<MyClass> <Complex /> <Complex /> <Complex /> <Complex /></MyClass>\[/code\]The Complex struct is marked as serializable, and being a struct, it has an implicit parameterless constructor. So why isn't each Complex object serializing its real and imaginary parts ? Does it have to do with the fact that the 'Real' and 'Imaginary' properties of the struct have getters but not setters ?Thanks.
 
Back
Top