Iβll let you guess, because when you see this too many times, you are calculating: you have an event , and you are subscribed from this event to some user interface code or something else Component .
When using BinaryFormatter events (more precisely, a support field) are serialized. If you do not want this, make sure your events are marked:
[field:NonSerialized] public event EventHandler SomethingHappened;
I will also note that when using BinaryFormatter a lot of (IMO, subjective) errors occur, which I really suggest using something else. For example, XmlSerializer (mumbles something inaudible about open source binary formatting, open source is also available).
source share