M
MP
Hello,
I am having a bit of a problem with Deserialization. I need to "override"
the special constructor used when
an object is deserialize. In thes constructor I have to execute some code
that is requierd by our framework and then call the
'original' special constructor.
How can I call the original constructor from my deserialization
constructor? I do not want to have to manually
do all the assignents to my class members, I just what to call "something"
that knows what to do.
Can anyone point me in the right direction?
[Serializable]
public class SomeEntity : ISerializable
{
public SomeEntity(SerializationInfo info, StreamingContext context)
{
// I want to have my code here...
// some code.
// Then call the "default" constructor.
// What code do I put in there?
}
int m_code = 0;
string m_description = "";
}
Thank you!
-Martin
I am having a bit of a problem with Deserialization. I need to "override"
the special constructor used when
an object is deserialize. In thes constructor I have to execute some code
that is requierd by our framework and then call the
'original' special constructor.
How can I call the original constructor from my deserialization
constructor? I do not want to have to manually
do all the assignents to my class members, I just what to call "something"
that knows what to do.
Can anyone point me in the right direction?
[Serializable]
public class SomeEntity : ISerializable
{
public SomeEntity(SerializationInfo info, StreamingContext context)
{
// I want to have my code here...
// some code.
// Then call the "default" constructor.
// What code do I put in there?
}
int m_code = 0;
string m_description = "";
}
Thank you!
-Martin