select Yes if the property is serialized according to the defined schema

HOTSPOT
You have an existing order processing system that accepts .xml files,
The following code shows an example of a properly formatted order in XML:

You create the following class that will be serialized:

For each of the following properties, select Yes if the property is serialized according to the defined
schema Otherwise, select No.

HOTSPOT
You have an existing order processing system that accepts .xml files,
The following code shows an example of a properly formatted order in XML:

You create the following class that will be serialized:

For each of the following properties, select Yes if the property is serialized according to the defined
schema Otherwise, select No.

Answer:



Leave a Reply 10

Your email address will not be published. Required fields are marked *


New

New

no yes yes

Begia

Begia

answer is no no yes ,because orderdate has no attribute DataMember

Lord Vader

Lord Vader

orderdate doesnt need one. it is public

no yes yes

zeti

zeti

this reply made me smile

Begia

Begia

no no yes

Miroslav

Miroslav

As of .NET 3.5 SP1, WCF will happily serialize classes without any [DataContract] and [DataMember] attributes… but as soon as you start using one of those attributes, then this “default” behavior will stop working – as soon as you have a single [DataMember] in your class, from that point on, only those properties with this attribute will be serialized

Kiro

Kiro

yes no yes

The Id will be also serialized as long as it has the [DataMember] attribute.
Since “Name” member is not defined for the ID, by default, the CLR member name is used as the name of the data member. By setting the Name property, you can customize the name of the data member.

Mich

Mich

From : Practical Microsoft SOA
Members of a class that are not explicitly marked with the [DataMember] attribute are not automatically serialised, regardless of their accessibility level