B
Beorne
I'm serializing a class using XmlSerializer. I'm forced to use
XmlSerializer because I'm working on compact framework and this is the
only serialization supported.
When I try to serialize a class with some delegate type member it
gives me an exception saying the member class should have a default
constructor (????). but the member class is a delegate ...
Example:
-----------------------------------------------------
[Serializable]
public static class DelegateContainer
{
public delegate void CustomDelegate(void);
}
[Serializable]
public class ClassToSerialize
{
DelegateContainer.CustomDelegate member = null;
}
------------------------------------------------------
When I serialize ClassToSerialize it gives me an exception saying
CustomDelegate should have a default constructor.
How could I do?
Thank you.
XmlSerializer because I'm working on compact framework and this is the
only serialization supported.
When I try to serialize a class with some delegate type member it
gives me an exception saying the member class should have a default
constructor (????). but the member class is a delegate ...
Example:
-----------------------------------------------------
[Serializable]
public static class DelegateContainer
{
public delegate void CustomDelegate(void);
}
[Serializable]
public class ClassToSerialize
{
DelegateContainer.CustomDelegate member = null;
}
------------------------------------------------------
When I serialize ClassToSerialize it gives me an exception saying
CustomDelegate should have a default constructor.
How could I do?
Thank you.