HOTSPOT
You have the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Explanation:
Note:
* The System.Runtime.Serialization namespace contains classes that can be used for serializing and
deserializing objects. Serialization is the process of converting an object or a graph of objects into a
linear sequence of bytes for either storage or transmission to another location. Deserialization is the
process of taking in stored information and recreating objects from it.
* EmitDefaultValue
DataMemberAttribute.EmitDefaultValue Property
Gets or sets a value that specifies whether to serialize the default value for a field or property being
serialized.
true if the default value for a member should be generated in the serialization stream; otherwise,
false.
Yes No No
0
0
YES NO NO – inaczej nie bydzie
0
0
Update: NO, NO, NO is correct !!!!!
Last Name will not be written because the EmitDefaultValue = false.
0
3
YES NO NO
LastName will not be written only if null.
0
0
Basic rules for ORDER
https://msdn.microsoft.com/en-us/library/ms729813(v=vs.110).aspx#Anchor_0
0
0
https://msdn.microsoft.com/en-us/library/aa347792(v=vs.110).aspx
n 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 zero. It is occasionally desirable to omit a data member from serialized data when it is set to its default value. Because the member has a default value, an actual value need not be serialized; this has a performance advantage.
To omit a member from serialized data, set the EmitDefaultValue property of the DataMemberAttribute attribute to false (the default is true).
0
0
last name will not be written if it is set to its default value of null.
YES
?
NO
0
0
For B.
The namespace is the default value:
http://schemas.datacontract.org/2004/07/
The name of the class is “Individual” which is the default
so B is NO
0
1