Why can't the 'NonSerialized' attribute be used at the class level? How to prevent serialization of
- by ck
I have a data object that is deep-cloned using a binary serialization. This data object supports property changed events, for example, PriceChanged.
Let's say I attached a handler to PriceChanged. When the code attempts to serialize PriceChanged, it throws an exception that the handler isn't marked as serializable.
My alternatives:
I can't…