YouaretestingacomponentthatserializestheMeetingclassinstancessothattheycanbesavedtothefilesystem.TheMeetingclasshasthefollowingdefinition:Thecomponentcontainsaprocedurewiththefollowingcodesegment.MeetingmyMeeting=newMeeting("Goals");myMeeting.roomNumber=1

题目

YouaretestingacomponentthatserializestheMeetingclassinstancessothattheycanbesavedtothefilesystem.TheMeetingclasshasthefollowingdefinition:

Thecomponentcontainsaprocedurewiththefollowingcodesegment.

MeetingmyMeeting=newMeeting("Goals");

myMeeting.roomNumber=1100;

string[]attendees=newstring[2]{"John","Mary"};

myMeeting.invitees=attendees;

XmlSerializerxs=newXmlSerializer(typeof(Meeting));

StreamWriterwriter=newStreamWriter(@"C:\Meeting.xml");

xs.Serialize(writer,myMeeting);

writer.Close();

YouneedtoidentifytheXMLblockthatiswrittentotheC:\Meeting.xmlfileasaresultofrunningthisprocedure.WhichXMLblockrepresentsthecontentthatwillbewrittentotheC:\Meeting.xmlfile?()


相似考题
参考答案和解析
参考答案:B