In our codebase any classes that need to be saved are IXmlSerializable, this means that they all have public parameterless constructors.
The problem with this, is I have to stick a remark above each one "Only for serialization purposes" because certain members on these instances are private and required, and are therefore required when calling all the 'usable' constructors.
What would be really nice is a way of saying "This constructor must only be called by serialization code/assemblies, otherwise I'm going to explode". Anyone know if there's a nice way to do this? They only way I can think of this is checking the call stack why sounds too expensive...