I'm using NetDataContractSerializer
. After successfully deserializing an object, is there a way to tell the object to finish its construction? I'm thinking along the lines of:
[DataContract]
class Foo
{
[DataMember]
int i;
[SerializationCompletedEvent]
void SerializationCompleted ()
{
i = i + 7;
}
}
Found it out myself by now.
http://msdn.microsoft.com/en-us/library/system.runtime.serialization.ondeserializedattribute.aspx
Someone missed an easy 15 points I guess?