nerdexam
Microsoft

70-515 · Question #58

You are implementing an ASP.NET web application. The application defines the following classes. public class Person { public String Name{get; set;} publicIList<Address> Addresses{get;set;} } public…

The correct answer is D. var XML= new. See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET web application. The application defines the following classes. public class Person { public String Name{get; set;} publicIList<Address> Addresses{get;set;} } public class Address { public String AddressType{get; set;} public string AddressValue{get;set;} } The applicaction must generate XML from personList, wich is a collection of Person instances. The following XML is an example of the schema than the generated XML must use. <Persons> <Person Name="John Doe"> <Address Email="[email protected]"/> <Address AlternativeEmail="[email protected]"/> <Address MSNInstanceMessenger="[email protected]"/> </Person> ..... </Persons> You need to generate the XML. Wich code segment should you use?

Options

  • Avar XML= new
  • Bvar XML= new
  • Cvar XML= new
  • Dvar XML= new

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    4% (1)
  • C
    12% (3)
  • D
    76% (19)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice