Handling Invalid Enum values in a DataContractSerializer

This all started when I was trying to serialize a CodeDom graph (actually a CodeNamespace object) using a DataContractSerializer. I hit the dreaded “Enum value ‘20482’ is invalid for type…” (Note: this error was the showstopper after many other errors) The problem: System.CodeDom.MemberAttributes should have the [Flags] attribute, but it does not. the value of …

Handling Invalid Enum values in a DataContractSerializer Read More »