您正在测试一个组件,该组件对Meeting 类实例进行序列化处理,以使它们能够保存到文件系统。 Meeting具有如下定义: public class Meeting { private string title; public int roomNumber; public string[] invitees; public Interview( ){ } public Interview (string t){ title = t; } } 组件包含一个带有以下代码段的过程 Meeting myMeeting = new Meeting("Objectives"); myMeeting.roomNumber=20; string[] attendees = new string[2]{"Amy", "Ally"}; myMeeting.invitees = attendees; XmlSerializer xs = new XmlSerializer(typeof(Meeting)); StreamWriter writer = new StreamWriter(@"C:/Meeting.xml"); xs.Serialize(writer, myMeeting); writer.Close( );/ 您需要确定作为运行此过程的结果写入C:/Meeting.xml 文件的XML 块。 哪个XML 块代表将写入C:/Meeting.xml 文件的内容?()
- A、
- B、
- C、
- D、
正确答案:B
答案解析:有
微信扫一扫手机做题