2

I've been trying to implement the OnDeserialized attribute in a method inside a class. After I deserialize the class with XmlSerializer the method is never called.

Is OnDeserialized method called even when the serialized class is a member property of the main class being serialized?

Is there something I'm missing?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Arturo Martinez
  • 3,737
  • 1
  • 22
  • 35

1 Answers1

3

The XML Serializer does not use OnDeserialized or OnSerialized. It also doesn't use the [Serializable] attribute, BTW.

John Saunders
  • 160,644
  • 26
  • 247
  • 397