1. Question: When running a Debug build of an application, you want to display a dialog box if the result of a calculation (stored in the result integer) is less than zero. Which of the following methods does this correctly?

    A
    Debug.Assert(result >= 0, “Result error”)

    B
    Trace.Assert(result >= 0, “Result error”)

    C
    Debug.WriteIf(result >= 0, “Result error”)

    D
    Trace.WriteIf(result >= 0, “Result error”)

    Note: Not available
    1. Report
  2. Question: You are creating a Console application, and you want Debug and Trace output displayed directly to the console. Which code sample does this correctly?

    A
    Debug.Listeners.Add(New DefaultTraceListener())
    Debug.AutoFlush = True

    B
    Debug.Listeners.Add(New ConsoleTraceListener())
    Debug.AutoFlush = True

    C
    Debug.Listeners.Add(New EventLogTraceListener())
    Debug.AutoFlush = True

    D
    Debug.Listeners.Add(New XmlWriterTraceListener())
    Debug.AutoFlush = True

    Note: Not available
    1. Report
  3. Question: You are creating a multithreaded application. You create an instance of PerformanceCounter named pc that might be referenced from multiple threads simultaneously. Which of the following calls is thread-safe? (Choose all that apply.)

    A
    pc.RawValue = pc.RawValue + 32

    B
    pc.Increment()

    C
    pc.Decrement()

    D
    pc.Increment(12)

    Note: Not available
    1. Report
  4. Question: You want to add a performance counter category with multiple counters programmatically. Which class should you use to specify the counters?

    A
    PerformanceCounterCategory

    B
    CounterSample

    C
    CounterCreationDataCollection

    D
    CounterCreationData

    Note: Not available
    1. Report
  5. Question: You need to retrieve a list of all running processes. Which method should you call?

    A
    Process.GetProcessesByName

    B
    Process.GetCurrentProcess

    C
    Process.GetProcesses

    D
    Process.GetProcessById

    Note: Not available
    1. Report
  6. Question: You need to query WMI for a list of logical disks attached to the current computer. Which code sample correctly runs the WMI query?

    A
    Dim searcher As New ObjectQuery("SELECT * FROM Win32_LogicalDisk")
    Dim query As ManagementObject = searcher.Get()

    B
    Dim searcher As New ManagementObjectSearcher( _
    "SELECT * FROM Win32_LogicalDisk")
    Dim queryCollection As ManagementObjectSearcher = searcher.Get()

    C
    Dim searcher As New ObjectQuery("SELECT * FROM Win32_LogicalDisk")
    Dim queryCollection As ManagementObjectCollection = searcher.Get()

    D
    Dim searcher As New ManagementObjectSearcher( _
    "SELECT * FROM Win32_LogicalDisk")
    Dim queryCollection As ManagementObjectCollection = searcher.Get()

    Note: Not available
    1. Report
  7. Question: You are creating an application that responds to WMI events to process new event log entries. Which of the following do you need to do? (Choose all that apply.)

    A
    Call the ManagementEventWatcher.Query method.

    B
    Create a ManagementEventWatcher object.

    C
    Create an event handler that accepts object and ManagementBaseObject parameters.

    D
    Register the ManagementEventWatcher.EventArrived handler.

    Note: Not available
    1. Report
  8. Question: Which of the following evidence types require an assembly to be signed? (Choose all that apply.)

    A
    Zone

    B
    Strong Name

    C
    Hash

    D
    Publisher

    Note: Not available
    1. Report
  9. Question: Which permission must an assembly have to connect to a Web server?

    A
    SocketPermission

    B
    WebPermission

    C
    DnsPermission

    D
    ServiceControllerPermission

    Note: Not available
    1. Report
  10. Question: Which of the following code groups offers the most restrictive permission set?

    A
    My_Computer_Zone

    B
    LocalIntranet_Zone

    C
    Internet_Zone

    D
    Restricted_Zone

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