G
Guest
I have a class (settings, etc.) which is derived from CollectionBase and
contains a number of fields and a few events. When I create an instance of
this class in my app, and serialize it, it works. If I add an event handler
in my app (for one of the events in my settings class), I get an exception
that my app class is not marked as Serializable. If I mark the app class as
Serializible, I get an exception that Type System.Windows.Forms.Form in
Assembly System.Windows.Form is not marked as Serializable. I am not
interested is serializing any data relating to the event, but it does not
seem possible to mark events/delegates as NonSerialized. Are events
serialized? How do I avoid this problem?
contains a number of fields and a few events. When I create an instance of
this class in my app, and serialize it, it works. If I add an event handler
in my app (for one of the events in my settings class), I get an exception
that my app class is not marked as Serializable. If I mark the app class as
Serializible, I get an exception that Type System.Windows.Forms.Form in
Assembly System.Windows.Form is not marked as Serializable. I am not
interested is serializing any data relating to the event, but it does not
seem possible to mark events/delegates as NonSerialized. Are events
serialized? How do I avoid this problem?