Robert Jordan
10/17/2004 10:55:00 AM
M.Sameer wrote:
> Does marking classes Serializable will make it possible to access public
> properties that are also objects?
Yes, but only when these objects are serializable, too.
Otherwise a SerializationException will be thrown.
Binary serialization always descends the whole object
graph following all references. That's very comfortable,
but it also implies, that *all* involved objects are
serializable.
You may control the serialization process by placing
[NonSerialized] attributes on fields that cannot be
serialized, but this doesn't make always sense (the
fields will be initialized with "null" in the other
process). You can reinitialize such fields by
implementing then IDeserializationCallback and/or
ISerializable interfaces.
bye
Rob