PrepAway - Latest Free Exam Questions & Answers

5 Comments on “For each of the following statements, select Yes if the statement is true. Otherwise, select No.

  1. Hans Werner says:

    Two of those answers are plain wrong! I don’t know if the exam expects me to mark those answers but from a technical point of view, they should all be marked as “Yes”!

    Here is a simple example which shows the real results:

    using System;

    namespace Test
    {
    [System.FlagsAttribute()]
    public enum Group
    {
    User = 1,
    Supervisor = 2,
    Manager = 4,
    Administrator = 8
    }

    public class User
    {
    public Group UserGroup { get; set; }
    }

    class Program
    {
    public static void Main(string[] args)
    {
    User user = new User();

    // Output: User, Supervisor
    user.UserGroup = Group.User | Group.Supervisor;
    Console.WriteLine(user.UserGroup);

    // Output: True
    user.UserGroup = Group.Administrator;
    Console.WriteLine(user.UserGroup == Group.Administrator);

    // Output: True
    user.UserGroup = Group.Supervisor;
    Console.WriteLine(user.UserGroup < Group.Administrator);

    Console.ReadKey();
    }
    }
    }




    0



    0
    1. SairajGunner says:

      Hans, you used a logical OR and hence the first question’s answer in still a ‘NO’ as the question asks whether a user can be a member of two groups ie. Group1 & Group2




      1



      1

Leave a Reply