ISerializable.GetObjectData not called on structs?

  • Thread starter Thread starter google
  • Start date Start date
G

google

I have a struct with no public members which implements ISerializable.
I've got a breakpoint in GetObjectData, and it never gets called. Is
this scenario supposed to work? I've tested this both with and without
the [Serializable] attribute on the struct's declaration. No errors
are encountered during XML serialization. C# 2.0.
 
Addendum/clarification - GetObjectData is called during binary
serialization, but does not appear to be called during XML
serialization.
 
Back
Top