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
0
0
Dudesays:
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 :/
0
0
ralitsasays:
lt; is encoded for “<" sign (comes from less than) – just browser's things 🙂
Yes Yes No
1
0
Yes Yes Yes
0
0
no – because more than one of the groups
yes – because it’s true
no – because user.UserGroup == Group.Administrators will return false
1
0
Yes – because enum is declared as flag so we can write the following: user.UserGroup = Group.Administrators|Group.Supervisors
Yes
Yes
2
0
you are right, please please ignore my previous message.
Anyone can explain thrid expression. I believe something is missing.
0
0
Correct answer is YES, YES, YES
lt; means less than ! Supervisor < Administrator = true
1
0
https://msdn.microsoft.com/en-us/library/system.flagsattribute.flagsattribute(v=vs.110).aspx
0
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
0
0
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 :/
0
0
lt; is encoded for “<" sign (comes from less than) – just browser's things 🙂
0
0