1. Question: You are writing an application that uses isolated storage to store user preferences. The application uses multiple assemblies. Multiple users will use this application on the same computer. You need to create a directory named Preferences in the isolated storage area that is scoped to the current Microsoft Windows identity and assembly. Which code segment should you use?

    A
    IsolatedStorageFile= store;
    store = IsolatedStorageFile::GetMachineStoreForAssembly(); store->CreateDirectory("Preferences");

    B
    IsolatedStorageFile= store;
    store = IsolatedStorageFile::GetUserStoreForAssembly(); store->CreateDirectory("Preferences");

    C
    IsolatedStorageFile= store;
    store = IsolatedStorageFile::GetUserStoreForDomain(); store->CreateDirectory("Preferences");

    D
    IsolatedStorageFile= store;
    store = IsolatedStorageFile::GetMachineStoreForApplication(); store->CreateDirectory("Preferences");

    Note: Not available
    1. Report
  2. Question: You are developing an application for a client residing in Hong Kong. You need to display negative currency values by using a minus sign. Which code segment should you use?

    A
    CultureInfo culture =
    new CultureInfo("zh-HK");
    return numberToPrint.ToString("-(0)", culture);

    B
    NumberFormatInfo culture =
    new CultureInfo("zh-HK").NumberFormat; culture.
    "A Composite Solution With Just One Click" - Certification Guaranteed 247 Microsoft 70-536 Exam CurrencyNegativePattern = 1;
    return numberToPrint.ToString("C", culture);

    C
    CultureInfo culture =
    new CultureInfo("zh-HK");
    return numberToPrint.ToString("()", culture);

    D
    NumberFormatInfo culture =
    new CultureInfo("zh-HK").NumberFormat;
    culture.NumberNegativePattern = 1;
    return numberToPrint.ToString("C", culture);

    Note: Not available
    1. Report
  3. Question: You are creating an undo buffer that stores data modifications. You need to ensure that the undo functionality undoes the most recent data modifications first. You also need to ensure that the undo buffer permits the storage of strings only. Which code segment should you use?

    A
    Stack undoBuffer = gcnew Stack();

    B
    Queue undoBuffer = gcnew Queue();

    C
    Stack<String=> undoBuffer = gcnew Stack<String=>();

    D
    Queue<String=> undoBuffer = gcnew Queue<String=>();

    Note: Not available
    1. Report
  4. Question: You create a method that runs by using the credentials of the end user. You need to use Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk. Which code segment should you use?

    A
    WindowsIdentity currentUser = WindowsIdentity.GetCurrent(); foreach (IdentityReference grp in currentUser.Groups) { NTAccount grpAccount =
    ((NTAccount)grp.Translate(typeof(NTAccount))); isAuthorized = grpAccount.Value.Equals(
    Environment.MachineName + @"\Clerk");
    "A Composite Solution With Just One Click" - Certification Guaranteed 248 Microsoft 70-536 Exam
    if (isAuthorized) break;
    }

    B
    WindowsPrincipal currentUser =
    (WindowsPrincipal)Thread.CurrentPrincipal;
    isAuthorized = currentUser.IsInRole(
    Environment.MachineName);

    C
    WindowsPrincipal currentUser =
    (WindowsPrincipal)Thread.CurrentPrincipal;
    isAuthorized = currentUser.IsInRole("Clerk");

    D
    GenericPrincipal currentUser =
    (GenericPrincipal) Thread.CurrentPrincipal;
    isAuthorized = currentUser.IsInRole("Clerk");

    Note: Not available
    1. Report
  5. Question: 

    You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust. You write the following code to ensure usage of the socket connections.

    SocketPermission permission =

    new SocketPermission(PermissionState.Unrestricted);

    permission.Assert();

    Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.

    You need to cancel the assertion. Which code segment should you use?

    A
    CodeAccessPermission.RevertDeny();

    B
    CodeAccessPermission.RevertAssert();

    C
    permission.Deny();

    D
    permission.PermitOnly();

    Note: Not available
    1. Report
  6. Question: You are developing a method to hash data with the Secure Hash Algorithm. The data is passed to your method as a byte array named message. You need to compute the hash of the incoming parameter by using SHA1. You also need to place the result into a byte array named hash. Which code segment should you use?

    A
    SHA1 sha = new SHA1CryptoServiceProvider();
    sha.GetHashCode();
    byte[] hash = sha.Hash;

    B
    SHA1 sha = new SHA1CryptoServiceProvider();
    byte[] hash = BitConverter.GetBytes(sha.GetHashCode());

    C
    SHA1 sha = new SHA1CryptoServiceProvider();
    byte[] hash = sha.ComputeHash(message);

    D
    SHA1 sha = new SHA1CryptoServiceProvider();
    byte[] hash = null;
    "A Composite Solution With Just One Click" - Certification Guaranteed 252 Microsoft 70-536 Exam
    sha.TransformBlock(
    message, 0, message.Length, hash, 0);

    Note: Not available
    1. Report
  7. Question: You are developing an application that will use custom authentication and role-based security. You need to write a code segment to make the runtime assign an unauthenticated principal object to each running thread. Which code segment should you use?

    A
    AppDomain= domain = AppDomain::CurrentDomain;
    domain->SetPrincipalPolicy(PrincipalPolicy::UnauthenticatedPrincipal);

    B
    AppDomain= domain = AppDomain::CurrentDomain;
    domain->SetPrincipalPolicy(PrincipalPolicy::WindowsPrincipal);

    C
    AppDomain= domain = AppDomain::CurrentDomain;
    domain->SetThreadPrincipal(gcnew WindowsPrincipal(nullptr));

    D
    AppDomain= domain = AppDomain::CurrentDomain;
    domain->SetAppDomainPolicy(PolicyLevel::CreateAppDomainLevel());

    Note: Not available
    1. Report
  8. Question: You are developing a custom event handler to automatically print all open documents. The event handler helps specify the number of copies to be printed. You need to develop a custom event arguments class to pass as a parameter to the event handler. Which code segment should you use?

    A
    public ref class PrintingArgs {
    public :
    EventArgs Args;
    PrintingArgs(EventArgs ea) {
    this->Args = ea;
    }
    };

    B
    public ref class PrintingArgs {
    public :
    int Copies;
    PrintingArgs (int numberOfCopies) {
    this->Copies = numberOfCopies;
    }
    };

    C
    public ref class PrintingArgs : public EventArgs {
    public :
    int Copies;
    };

    D
    public ref class PrintingArgs : public EventArgs {
    public :
    int Copies;
    PrintingArgs(int numberOfCopies) {
    this->Copies = numberOfCopies;
    }
    };

    Note: Not available
    1. Report
  9. Question: You create a method that runs by using the credentials of the end user. You need to use Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk. Which code segment should you use?

    A
    GenericPrincipal= currentUser =
    safe_cast(Thread::CurrentPrincipal); isAuthorized = currentUser->IsInRole("Clerk");

    B
    WindowsIdentity= currentUser = WindowsIdentity::GetCurrent(); For each (IdentityReference= grp in currentUser->Groups) { NTAccount= grpAccount =
    safe_cast(grp->Translate(NTAccount::typeid)); isAuthorized = grpAccount->Value->Equals(
    Environment::MachineName + "\\Clerk");
    if (isAuthorized) break
    ;}

    C
    WindowsPrincipal= currentUser =
    safe_cast(Thread::CurrentPrincipal);
    isAuthorized = currentUser->IsInRole("Clerk");

    D
    WindowsPrincipal= currentUser =
    safe_cast(Thread::CurrentPrincipal); isAuthorized = currentUser->IsInRole(
    Environment::MachineName);

    Note: Not available
    1. Report
  10. Question: 

    You are testing a component that serializes the Meeting class instances so that they can be saved to the file system. The Meeting class has the following definition:

    public ref class Meeting {

    private :

    String= title;

    public :

    int roomNumber;

    array<String=>= invitees;

    Meeting(){}

    Meeting(String= t){

    title = t;

    }

    };

    The component contains a procedure with the following code segment.

    Meeting= myMeeting = gcnew Meeting("Goals");

    myMeeting->roomNumber=1100;

    array<String=>= attendees = gcnew array<String=>(2)

    {"John", "Mary"};

    myMeeting->invitees = attendees;

    XmlSerializer= xs = gcnew XmlSerializer(__typeof(Meeting));

    StreamWriter= writer = gcnew StreamWriter("C:\\Meeting.xml");

    xs->Serialize(writer, myMeeting);

    writer->Close();

    You need to identify the XML block that is written to the C:\Meeting.xml file as a result of running this procedure.

    Which XML block represents the content that will be written to the C:\Meeting.xml file?

    A
    <?xml version="1.0" encoding="utf-8"?>
    <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber>
    <invitees>
    <string>John</string>
    </invitees>
    <invitees>
    <string>Mary</string>
    </invitees>
    </Meeting>

    B
    <?xml version="1.0" encoding="utf-8"?>
    <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" title="Goals">
    <roomNumber>1100</roomNumber>
    <invitees>
    <string>John</string>
    <string>Mary</string>
    </invitees>
    </Meeting>

    C
    <?xml version="1.0" encoding="utf-8"?>
    <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance">
    <title>Goals</title>
    <roomNumber>1100</roomNumber>
    <invitee>John</invitee>
    "A Composite Solution With Just One Click" - Certification Guaranteed 256 Microsoft 70-536 Exam
    <invitee>Mary</invitee>
    </Meeting>

    D
    <?xml version="1.0" encoding="utf-8"?>
    <Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance"> <roomNumber>1100</roomNumber>
    <invitees>
    <string>John</string>
    <string>Mary</string>
    </invitees>
    </Meeting>

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd