HOTSPOT
You are reviewing the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
HOTSPOT
You are reviewing the following code:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Yes Yes No
Yes Yes Yes
Yes No No
no – because more than one of the groups
yes – because it’s true
no – because user.UserGroup == Group.Administrators will return false
Yes – because enum is declared as flag so we can write the following: user.UserGroup = Group.Administrators|Group.Supervisors
Yes
Yes
you are right, please please ignore my previous message.
Anyone can explain thrid expression. I believe something is missing.
Correct answer is YES, YES, YES
lt; means less than ! Supervisor < Administrator = true
YES NO NO – inaczej nie bydzie
Update: NO, NO, NO is correct !!!!!
Last Name will not be written because the EmitDefaultValue = false.
YES NO NO
LastName will not be written only if null.
https://msdn.microsoft.com/en-us/library/system.flagsattribute.flagsattribute(v=vs.110).aspx
Basic rules for ORDER
https://msdn.microsoft.com/en-us/library/ms729813(v=vs.110).aspx#Anchor_0
Sbuse says:
December 20, 2016 at 5:03 pm
Yes – because enum is declared as flag so we can write the following: user.UserGroup = Group.Administrators|Group.Supervisors
Yes
Yes- supervisors < administrators i.e 2 < 8
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).
last name will not be written if it is set to its default value of null.
YES
?
NO
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
Can anyone tell me “user.UserGroup it; Group Administrators” – what is this syntax? and how does it work? It is the first time I’m seeing it :/
lt; is encoded for “<" sign (comes from less than) – just browser's things 🙂