exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 1 question 81 discussion

Actual exam question from Microsoft's 70-483
Question #: 81
Topic #: 1
[All 70-483 Questions]

HOTSPOT -
You have the following code:

For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
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.

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
patoyanez
Highly Voted 5 years, 10 months ago
Yes,No,No
upvoted 34 times
...
zzMichielzz
Most Recent 4 years, 2 months ago
Yes (wether lastname will be filled or not, firstname always becomes the first element), No - see output No - if you don't fill it, it won't appear in the xml using the default value. Output with first- and lastname: <Individual xmlns="http://schemas.datacontract.org/2004/07/Console70483exam" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><FirstName>John</FirstName><LastName>Doe</LastName></Individual> Output without firstname and lastname: <Individual xmlns="http://schemas.datacontract.org/2004/07/Console70483exam" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><FirstName i:nil="true"/></Individual>
upvoted 3 times
zzMichielzz
4 years, 2 months ago
Oops. it's very important to know that the order in this case wont be changed and is the answer correct but it will change order alphabettically if the names where different for example i place a Z before firstname: <Individual xmlns="http://schemas.datacontract.org/2004/07/Console70483exam" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><LastName>Doe</LastName><ZFirstName>John</ZFirstName></Individual>
upvoted 4 times
...
...
HgstExam
4 years, 3 months ago
If no Order is specified, it will be alphabetically: Firstname < LastName EmitDefaultValue is set to False, therefore there when there is no default it will not be serialized So YES,NO,NO?
upvoted 2 times
...
slobex
4 years, 6 months ago
URLs: https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/data-member-default-values https://docs.microsoft.com/en-us/dotnet/api/system.runtime.serialization.datamemberattribute.emitdefaultvalue?view=netcore-3.1
upvoted 1 times
...
majco333
5 years ago
Ordering (eng): https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/data-member-order
upvoted 2 times
majco333
4 years, 12 months ago
It's YES, NO, NO. If order is the same, appears alphabetically first.
upvoted 11 times
...
...
majco333
5 years ago
No,No,No Why first is NO? Ordering: https://docs.microsoft.com/cs-cz/dotnet/framework/wcf/feature-details/data-member-order?redirectedfrom=MSDN
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago