nerdexam
Microsoft

70-513 · Question #308

Windows Communication Foundation (WCF) application uses a data contract that has several data members. You need the application to throw a Serialization Exception if any of the data members are not…

The correct answer is D. Set the lsRequired property of each data member to true. See the full explanation below for the reasoning.

Question

Windows Communication Foundation (WCF) application uses a data contract that has several data members. You need the application to throw a Serialization Exception if any of the data members are not present when a serialized instance of the data contract is deserialized. What should you do?

Options

  • AAdd the Known Type attribute to the data contract.
  • BAdd the Known Type attribute to the data contract.
  • CSet the Emit Default Value property of each data member to false.
  • DSet the lsRequired property of each data member to true.

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    9% (2)
  • D
    83% (19)

Community Discussion

No community discussion yet for this question.

Full 70-513 Practice