Serialize Custom Series Into .TEN File?
Posted: Wed Feb 22, 2012 11:22 am
Hi,
I saw a similar post already in this forum and there was no clear answer posted. Therefor I want to post an identical problem I focus. I use version 3.5 and just tried it with the lates 2011 version (trial), but still with no luck.
I'm trying to derive my own series from a TeeChart.NET series type and then in my derived class, I add my own custom properties which are known types (like string, int, double, ...). I need the custom series to be serialized to and deserialized from a .TEN file.
This seemed to work ok in a simple test case (as long as I provided a default constructor and a constructor taking a Chart), but in my main project, I can't seem to get it to work. TeeChart.NET would crash when attempting to load my ".TEN" file with the custom series: a system.reflection.TargetInvocationException.... I do exactly the same like in my simple test case, so I assume that my derived class works fine. I also tried with ISerializable, and I know this technique very well, but without success.
I know that it should be better that I can post my main project, but it is rather a big project... I tried already everything but keep on being desperite.
Do you have already a solution for this?
Thank you.
DaVinci.
I saw a similar post already in this forum and there was no clear answer posted. Therefor I want to post an identical problem I focus. I use version 3.5 and just tried it with the lates 2011 version (trial), but still with no luck.
I'm trying to derive my own series from a TeeChart.NET series type and then in my derived class, I add my own custom properties which are known types (like string, int, double, ...). I need the custom series to be serialized to and deserialized from a .TEN file.
This seemed to work ok in a simple test case (as long as I provided a default constructor and a constructor taking a Chart), but in my main project, I can't seem to get it to work. TeeChart.NET would crash when attempting to load my ".TEN" file with the custom series: a system.reflection.TargetInvocationException.... I do exactly the same like in my simple test case, so I assume that my derived class works fine. I also tried with ISerializable, and I know this technique very well, but without success.
I know that it should be better that I can post my main project, but it is rather a big project... I tried already everything but keep on being desperite.
Do you have already a solution for this?
Thank you.
DaVinci.