MB7-701 ExamKill.com

Page 6

public string firstName; [DataMember] public string lastName; [DataMember(EmitDefaultValue = true)] public int age = 0; [DataMember(EmitDefaultvValue = true)] public int ID = 999999999; B. [DataMember(EmitDefaultValue = false)] public string firstName = null; [DataMember(EmitDefaultValue = false)] public string lastName = null; [DataMember(EmitDefaultValue = true)] public int age = -1; [DataMember(EmitDefaultValue = false)] public int ID = 999999999; C. [DataMember(EmitDefaultValue = true)] public string firstName; [DataMember(EmitDefaultValue = true)] public string lastName; [DataMember(EmitDefaultValue = false)] public int age = -1; [DataMember(EmitDefaultValue = false)] public int ID = 999999999; D. [DataMember] public string firstName = null; [DataMember] public string lastName = null; [DataMember(EmitDefaultValue = false)] public int age = 0; [DataMember(EmitDefaultValue = false)] public int ID = 999999999;

Answer: D Section: (none) Explanation Explanation/Reference: In the .NET Framework, types have a concept of default values. For example, for any reference type the default value is null, and for an integer type it is 0. It is occasionally desirable to omit a data member from the serialized data when it is set to its default value. To do this, set the EmitDefaultValue property to false (it is true by default). EmitDefaultValue Attribute (http://msdn.microsoft.com/enus/library/system.runtime.serialization.datamemberattribute.emitdefaultvalue. aspx) Data Member Default Values (http://msdn.microsoft.com/en-us/library/aa347792.aspx)

Question: 6

http://www.examkill.com/MB7-701.html

Adobe Apple Cisco CompTIA HP EMC IBM Microsoft Oracle Juniper

6


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.