0

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;
    }
}
mafu
  • 31,798
  • 42
  • 154
  • 247

1 Answers1

0

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?

mafu
  • 31,798
  • 42
  • 154
  • 247