nerdexam
Microsoft

70-515 · Question #31

You are implementing an ASP.NET Web site. The site contains the following class. public class Address { public int AddressType; public string Line1; public string Line2; public string City; public…

The correct answer is A. Add the following attribute to the AddressType field. D. Add the following attribute to the ZipPostalCode field. See the full explanation below for the reasoning.

Question

You are implementing an ASP.NET Web site. The site contains the following class. public class Address { public int AddressType; public string Line1; public string Line2; public string City; public string ZipPostalCode; } The Web site interacts with an external data service that requires Address instances to be given in the following XML format. <Address AddressType="2"> <Line1>250 Race Court</Line1> <City>Chicago</City> <ZipCode>60603</ZipCode> </Address> You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service. Which two actions should you perform (Each correct answer presents part of the solution. Choose two.)

Options

  • AAdd the following attribute to the AddressType field.
  • BAdd the following attribute to the Line2 field.
  • CAdd the following attribute to the ZipPostalCode field.
  • DAdd the following attribute to the ZipPostalCode field.

How the community answered

(48 responses)
  • A
    75% (36)
  • B
    10% (5)
  • C
    15% (7)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice