题目内容
Youcreateaclasslibrarythatcontainstheclasshierarchydefinedinthefollowingcodesegment.(Linenumbersareincludedforreferenceonly.)
YoucreateaninstanceoftheGroupclass.Youpopulatethefieldsoftheinstance.WhenyouattempttoserializetheinstancebyusingtheSerializemethodoftheXmlSerializerclass,youreceiveInvalidOperationException.Youalsoreceivethefollowingerrormessage:"TherewasanerrorgeneratingtheXMLdocument."YouneedtomodifythecodesegmentsothatyoucansuccessfullyserializeinstancesoftheGroupclassbyusingtheXmlSerializerclass.YoualsoneedtoensurethattheXMLoutputcontainsanelementforallpublicfieldsintheclasshierarchy.
Whatshouldyoudo?()
查看答案
搜索结果不匹配?点我反馈