陈斌彬的技术博客

Stay foolish,stay hungry

C# 里的 XmlInclude

[XmlInclude(typeof(DescriptorType))]
[XmlInclude(typeof(DescriptorRecognition))]
[XmlInclude(typeof(SeperatorCollection))]
[XmlInclude(typeof(Descriptor))]
[XmlInclude(typeof(DescriptorCollection))]

向 Web Service 里解释你 Include 的几个类型,如果不解释,调用方法时会报:“使用 XmlInclude 或 SoapInclude 属性静态指定非已知的类型。”这种错误