For each of the following statements, select Yes if the statement is true.

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.

Answer:



Leave a Reply 18

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


sv1slim

sv1slim

no – because more than one of the groups
yes – because it’s true
no – because user.UserGroup == Group.Administrators will return false

Sbuse

Sbuse

Yes – because enum is declared as flag so we can write the following: user.UserGroup = Group.Administrators|Group.Supervisors
Yes
Yes

Serge

Serge

you are right, please please ignore my previous message.
Anyone can explain thrid expression. I believe something is missing.

Najlepszy Programista Swiata DAGO

Najlepszy Programista Swiata DAGO

Correct answer is YES, YES, YES

lt; means less than ! Supervisor < Administrator = true

Najlepszy Programista Swiata DAGO

Najlepszy Programista Swiata DAGO

YES NO NO – inaczej nie bydzie

Najlepszy Programista Swiata

Najlepszy Programista Swiata

Update: NO, NO, NO is correct !!!!!

Last Name will not be written because the EmitDefaultValue = false.

Artem

Artem

YES NO NO
LastName will not be written only if null.

Lord Vader

Lord Vader

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

Lord Vader

Lord Vader

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).

Lord Vader

Lord Vader

last name will not be written if it is set to its default value of null.

YES
?
NO

Dude

Dude

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 :/

ralitsa

ralitsa

lt; is encoded for “<" sign (comes from less than) – just browser's things 🙂