1. Question: Certkiller.com is currently using a performance counter named HitCounter.
    You are required to increment each time a user accesses the UI classes within the application.
    You have to adjust the HitCounter performance counter when a hit occurs.
    What should you do? - (VB.Net)

    A
    Use the following code:
    Dim hitCounter As New PerformanceCounter(\"ApplicationPerformance\", \"HitCounter\")
    hitCounter.[ReadOnly] = False
    hitCounter.Increment()

    B
    Use the following code:
    Dim hitCounter As New PerformanceCounter(\"ApplicationPerformance\", \"HitCounter\")
    hitCounter.Increment()

    C
    Use the following code:
    Dim hitCounter As New PerformanceCounter(\"ApplicationPerformance\", \"HitCounter\")
    D. Use the following code:
    Dim hitCounter As New PerformanceCounter(\"ApplicationPerformance\", \"HitCounter\")
    hitCounter.[ReadOnly] = False
    hitCounter += 1

    Note: Not available
    1. Report
  2. Question: You would like to create a custom performance counter for an application that you created
    recently.
    To do this, you decide to create a custom category named ApplicationPerformance and a
    performance
    counter named HitNumber.
    You need to ensure that this counter is shared across numerous applications.
    What should you do? - (VB.Net)

    A
    Use the following code:
    PerformanceCounterCategory.Create(\"ApplicationPerformance\", \"ApplicationPerformanceHelp\",
    _
    PerformanceCounterCategoryType.MultiInstance, \"HitNumber\", \"HitNumberHelp\")

    B
    Use the following code:
    PerformanceCounterCategory.Create(\"HitNumber\", \"HitNumberHelp\", _
    PerformanceCounterCategoryType.SingleInstance, \"ApplicationPerformance\",
    \"ApplicationPerformanceHelp\")

    C
    Use the following code:
    PerformanceCounterCategory.Create(\"HitNumber\", \"HitNumberHelp\", _
    PerformanceCounterCategoryType.MultiInstance, \"ApplicationPerformance\",
    \"ApplicationPerformanceHelp\")

    D
    Use the following code:
    PerformanceCounterCategory.Create("ApplicationPerformance", "ApplicationPerformanceHelp",
    _
    PerformanceCounterCategoryType.SingleInstance, "HitNumber", "HitNumberHelp")

    Note: Not available
    1. Report
  3. Question: You are required to launch the App.exe process, and specify sample.txt as the input file.
    App.exe will then use the contents of sample.txt to establish the environment's current settings.
    You need to ensure that the code you use meets these requirements.
    What should you do? - (VB.Net)

    A
    Use the following code:
    Dim myProcess As New Process()
    myProcess.StartInfo = New ProcessStartInfo("App.exe sample.txt")
    myProcess.Start()

    B
    Use the following code:
    Dim myProcess As New Process()
    myProcess.StartInfo = New ProcessStartInfo("App.exe")
    myProcess.ProcessStartArgs("sample.txt")
    myProcess.Start()

    C
    Use the following code:
    Dim myProcess As New Process()
    myProcess.StartInfo = New ProcessStartInfo("App.exe")
    myProcess.Start("sample.txt")

    D
    Use the following code:
    Dim myProcess As New Process()
    myProcess.StartInfo = New ProcessStartInfo("App.exe")
    myProcess.StartInfo.FileName = "sample.txt"
    myProcess.Start()

    Note: Not available
    1. Report
  4. Question: You work as an application developer at Certkiller .com. Certkiller .com uses an application that
    calculates
    monthly payments based upon client input.
    You are currently debugging this application using the Microsoft Visual Studio 2005 IDE.
    The application contains the following code:
    Public Function CalculateMonthlyPayment(rate As [Single], principal As Double) As Double
    'Implementation code
    End Function
    You have discovered that unexpected results are being returned by the application. You would
    like to pause
    execution and display a message box containing an error message in the event of a negative or
    zero rate
    value is Passed to the CalculateMonthlyPayment method.
    You need to ensure that this only occurs during debugging mode.
    What should you do? - (VB.Net)

    A
    Add the following code to the beginning of the CalculateMonthlyPayment method:
    Debug.Assert(rate > 0, "Rate Error", "Rate must be > zero")

    B
    Add the following code to the beginning of the CalculateMonthlyPayment method:
    If rate <= 0 Then
    MessageBox.Show("Rate is" & rate, [Error])
    End If

    C
    Add the following code to the beginning of the CalculateMonthlyPayment method:
    If rate <= 0 Then
    Debug.WriteLine("Error Rate is" & rate)
    End If

    D
    Add the following code to the beginning of the CalculateMonthlyPayment method:
    Debug.WriteLineIf(rate <= 0, "Error Rate is" And rate)

    Note: Not available
    1. Report
  5. Question: You have recently created an application, and want to capture all debugging text messages
    generated by it.
    You would like these debugging messages to display on the command line. The application that
    you
    created contains the following code:
    Debug.WriteLine("Start the processing")
    Console.WriteLine("Generated by Console.WriteLine")
    Debug.WriteLine("End the processing")
    You need to ensure that you are able to capture all debugging messages to the command line.
    What should you do? - (VB.Net)

    A
    Use the following code:
    Debug.Listeners.Add(New TextWriterTraceListener(Console.Out))
    Debug.AutoFlush = True

    B
    Use the following code:
    Debug.Listeners.Add(New StreamWriter(Console.Out))
    Debug.AutoFlush = True

    C
    Use the following code:
    Debug.Listeners.Add(New ConsoleTraceListener())
    Debug.AutoFlush = True

    D
    Use the following code:
    Debug.Listeners.Add(New DefaultTraceListener())
    Debug.AutoFlush = True

    Note: Not available
    1. Report
  6. Question: You have created an application to interface with an inventory storage system, and want to
    enable
    tracing in the application to track stock shortages and surpluses.
    The application should not, however, trace inventory levels if no shortages or surpluses exist.
    In addition, you do not want recompile every time to switch tracing capabilities on or off.
    What should you do? - (VB.Net)

    A
    Specify a command-line argument named InventoryTrace, and configure the application to
    read the
    argument.

    B
    Specify a system-wide environmental variable named InventoryTrace, and configure the
    application to
    read the environmental variable.

    C
    Specify a registry key named InventoryTrace, and configure the application to read the
    registry key
    setting

    D
    Specify a BooleanSwitch named InventoryTrace, and configure it in the application
    configuration file.

    Note: Not available
    1. Report
  7. Question: Certkiller .com has a server named Certkiller -SR05 that has numerous processors installed.
    You have been given the task of developing an application that displays certain clock speed
    statistics
    on all processors installed on Certkiller -SR05.
    You need to ensure that this requirement is fully satisfied.
    What should you do? - (VB.Net)

    A
    Use the following code:
    Dim processorSearcher As New ManagementObjectSearcher()
    For Each obj As ManagementObject In processorSearcher.[Get]("SELECT * FROM
    Win32_Processor")
    Console.WriteLine("{0}", obj("Name"))
    Console.WriteLine("{0} / {1}", obj("CurrentClockSpeed"), Obj("MaxClockSpeed"))
    Next

    B
    Use the following code:
    Dim processorSearcher As New ManagementObjectSearcher("SELECT * FROM
    Win32_Processor")
    For Each obj As ManagementObject In processorSearcher.[Get]()
    Console.WriteLine("{0}", obj("Name"))
    Console.WriteLine("{0} / {1}", obj("CurrentClockSpeed"), obj("MaxClockSpeed"))
    Next

    C
    Use the following code:
    Dim processorQuery As New ManagementObjectQuery()
    For Each obj As ManagementObject In processorQuery.[Get]("SELECT * FROM
    Win32_Processor")
    Console.WriteLine("{0}", obj("Name"))
    Console.WriteLine("{0} / {1}", obj("CurrentClockSpeed"), obj("MaxClockSpeed"))
    Next

    D
    Use the following code:
    Dim processorQuery As New ManagementObjectQuery("SELECT * FROM Win32_Processor")
    For Each obj As ManagementObject In processorQuery.[Get]()
    Console.WriteLine("{0}", obj("Name"))
    Console.WriteLine("{0} / {1}", obj("CurrentClockSpeed"), obj("MaxClockSpeed"))
    Next

    Note: Not available
    1. Report
  8. Question: You have developed an application that simplifies hard drive management for Certkiller .com's
    administrators.
    The application that you created logs all modifications made to physical hard drives on an hourly
    basis.
    You now need to create an EventQuery object for this application.
    What should you do? - (VB.Net)

    A
    Use the following code:
    Dim query As New EventQuery()
    query.QueryString = "SELECT InstanceModificationEvent FROM 'Win32_DiskDrive' WITHIN
    3600"

    B
    Use the following code:
    Dim query As New EventQuery()
    query.QueryString = "SELECT * FROM _InstanceModificationEvent WITHIN 3600 " + "WHERE
    TargetInstance ISA 'Win32_DiskDrive'"

    C
    Use the following code:
    Dim query As New EventQuery()
    query.QueryString = "SELECT * FROM 'Win32_DiskDrive' WITHIN 3600" + "WHERE
    TargetInstance
    ISA_InstanceModificationEvent"

    D
    Use the following code:
    Dim query As New EventQuery()
    query.QueryString = "SELECT * FROM_InstanceModificationEvent WITHIN 3600" + "WHERE
    Instance
    = 'Win32_DiskDrive'"

    Note: Not available
    1. Report
  9. Question: You are writing a method to compress an array of bytes.
    The array is passed to the method in a parameter named document.
    You need to compress the incoming array of bytes and return the result as an array of bytes.
    Which code segment should you use? - (VB.Net)

    A
    Dim strm As New MemoryStream(document)
    Dim deflate As New DeflateStream(strm, CompressionMode.Compress)
    Dim result As Byte() = New Byte(document.Lenght - 1) {}
    deflate.Write(result, 0, result.Lenght)
    Return result

    B
    Dim strm As New MemoryStream(document)
    Dim deflate As New DeflateStream(strm, CompressionMode.Compress)
    deflate.Write(document, 0, document.Lenght)
    deflate.Close()
    Return strm.ToArray()

    C
    Dim strm As New MemoryStream()
    Dim deflate As New DeflateStream(strm, CompressionMode.Compress)
    deflate.Write(document, 0, document.Lenght)
    deflate.Close()
    Return strm.ToArray()

    D
    Dim inStream As New MemoryStream(document)
    Dim deflate As New DeflateStream(inStream, CompressionMode.Compress)
    Dim outStream As New MemoryStream()
    Dim b As Integer
    While (InlineAssignHelper(b, deflate.ReadByte())) <> -1
    outStream.WriteByte(CByte(b))
    End While
    Return outStream.ToArray()

    Note: Not available
    1. Report
  10. Question: You are writing an application that uses SOAP to exchange data with other applications.
    You use a Department class that inherits from ArrayList to send objects to another application.
    The Department object is named dept.
    You need to ensure that the application serializes the Department object for transport by using
    SOAP.
    Which code should you use? - (Vb.Net)

    A
    Dim formatter As New SoapFormatter()
    Dim buffer As bytes() = New Byte(dept.Capacity - 1) {}
    Dim stream As New MemoryStream(buffer)
    For Each o As Object In dept
    formatter.Serialize(stream, o)
    Next

    B
    Dim formatter As New SoapFormatter()
    Dim buffer As bytes() = New Byte(dept.Capacity - 1) {}
    Dim stream As New MemoryStream(buffer)
    formatter.Serialize(stream, dept)

    C
    Dim formatter As New SoapFormatter()
    Dim stream As New MemoryStream()
    For Each o As Object In dept
    formatter.Serialize(stream, o)
    Next

    D
    Dim formatter As New SoapFormatter()
    Dim stream As New MemoryStream()
    formatter.Serialize(stream, dept)

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