I’m just saving this here for future reference: here’s an example of a serializable exception in C#:
Some things of note:
[Serializable] attributeXmlValidationException(SerializationInfo, StreamingContext)GetObjectData(SerializationInfo, StreamingContext)Also included is a battery of unit tests to verify that the class really does serialize and deserialize itself properly:
Content © 2025 Richard Cook. All rights reserved.