Question:

You are testing a component that serializes the Meeting class instances so that they can be saved to the file system. The Meeting class has the following definition:

public ref class Meeting {

private :

String= title;

public :

int roomNumber;

array<String=>= invitees;

Meeting(){}

Meeting(String= t){

title = t;

}

};

The component contains a procedure with the following code segment.

Meeting= myMeeting = gcnew Meeting("Goals");

myMeeting->roomNumber=1100;

array<String=>= attendees = gcnew array<String=>(2)

{"John", "Mary"};

myMeeting->invitees = attendees;

XmlSerializer= xs = gcnew XmlSerializer(__typeof(Meeting));

StreamWriter= writer = gcnew StreamWriter("C:\\Meeting.xml");

xs->Serialize(writer, myMeeting);

writer->Close();

You need to identify the XML block that is written to the C:\Meeting.xml file as a result of running this procedure.

Which XML block represents the content that will be written to the C:\Meeting.xml file?

 

A <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber>
<invitees>
<string>John</string>
</invitees>
<invitees>
<string>Mary</string>
</invitees>
</Meeting> 

B <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" title="Goals">
<roomNumber>1100</roomNumber>
<invitees>
<string>John</string>
<string>Mary</string>
</invitees>
</Meeting> 

C <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance">
<title>Goals</title>
<roomNumber>1100</roomNumber>
<invitee>John</invitee>
"A Composite Solution With Just One Click" - Certification Guaranteed 256 Microsoft 70-536 Exam
<invitee>Mary</invitee>
</Meeting> 

D <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber>
<invitees>
<string>John</string>
<string>Mary</string>
</invitees>
</Meeting> 

+ Answer
+ Report
Total Preview: 954

Copyright © 2024. Powered by Intellect Software Ltd