WCF - serializing inherited types
问题 I have these classes: [DataContract] public class ErrorBase {} [DataContract] public class FileMissingError: ErrorBase {} [DataContract] public class ResponseFileInquiry { [DataMember] public List<ErrorBase> errors {get;set;}; } An instance of the class ResponseFileInquiry is what my service method returns to the client. Now, if I fill ResponseFileInquiry.errors with instances of ErrorBase, everything works fine, but if I add an instance of inherited type FileMissingError, I get a service