1. Question: Which class would you need to create an instance of to specify that a string should be centered when drawn? - VB.NET

    A
    StringFormat

    B
    StringAlignment

    C
    FormatFlags

    D
    LineAlignment

    Note: Not available
    1. Report
  2. Question: Which of the following commands would cause a string to be flush left? - VB.NET

    A
    StringFormat.LineAlignment = Near

    B
    StringFormat.LineAlignment = Far

    C
    StringFormat.Alignment = Near

    D
    StringFormat.Alignment = Far

    Note: Not available
    1. Report
  3. Question: You are developing an application that will add text to JPEG, PNG, and GIF image files. Which class should you use to allow you to edit any of those image formats? - VB.NET

    A
    Metafile

    B
    Icon

    C
    Bitmap

    D
    Image

    Note: Not available
    1. Report
  4. Question: You need to run a method named ThreadProc in a background thread. Which code sample does this correctly? - VB.NET

    A
    ThreadPool.QueueUserWorkItem(AddressOf ThreadProc)

    B
    ThreadPool.QueueUserWorkItem(ThreadProc)

    C
    ThreadStart.CreateDelegate(AddressOf ThreadProc)

    D
    ThreadStart.CreateDelegate(ThreadProc)

    Note: Not available
    1. Report
  5. Question: You are creating an application that performs time-consuming calculations. You create a method named Calc that performs the calculations. You need to provide two integer values to Calc. What should you do? (Each answer forms part of the complete solution. Choose all that apply.) - VB.NET

    A
    Call ThreadPool.GetAvailableThreads to retrieve a handle to the thread.

    B
    Create a custom class that contains two integer members and create an instance of that class containing the values that you need to pass to the method.

    C
    Create a custom class that contains two integer members and a delegate for the Calc method and create an instance of that class containing the values you need to pass to the method.

    D
    Call ThreadPool.QueueUserWorkItem and pass the Calc method and the instance of the custom class.

    E
    Call ThreadPool.QueueUserWorkItem and pass only the instance of the custom class.

    Note: Not available
    1. Report
  6. Question: You will create an application that starts a new Thread object to run a method. You want the Thread to run as quickly as possible, even if that means it receives more processor time than the foreground thread. Which code sample does this correctly? - VB.NET

    A
    Dim DoWorkThread As New Thread(New ThreadStart(AddressOf DoWork))
    DoWorkThread.ThreadState = ThreadState.Running
    DoWorkThread.Start()

    B
    Dim DoWorkThread As New Thread(New ThreadStart(AddressOf DoWork))
    DoWorkThread.Priority = ThreadPriority.Highest
    DoWorkThread.Start()

    C
    Dim DoWorkThread As New Thread(New ThreadStart(AddressOf DoWork))
    DoWorkThread.Priority = ThreadPriority.Lowest
    DoWorkThread.Start()

    D
    Dim DoWorkThread As New Thread(New ThreadStart(AddressOf DoWork))
    DoWorkThread.ThreadState = ThreadState.WaitSleepJoin
    DoWorkThread.Start()

    Note: Not available
    1. Report
  7. Question: You are creating a method that is part of a custom class. The method might be run simultaneously within multiple threads. You need to ensure that no thread writes to the file while any thread is reading from the file. You want to provide the highest level of efficiency when multiple threads are reading from the file simultaneously. Which code sample should you use? - VB.NET

    A
    SyncLock file
    ' Read file
    End SyncLock

    B
    SyncLock
    ' Read file
    End SyncLock

    C
    Dim rwl As New ReaderWriterLock()
    rwl.AcquireReaderLock()
    ' Read file
    rwl.ReleaseReaderLock()

    D
    Dim rwl As New ReaderWriterLock()
    rwl.AcquireReaderLock(10000)
    ' Read file
    rwl.ReleaseReaderLock()

    Note: Not available
    1. Report
  8. Question: You are writing a method that tracks the total number of orders in shopping carts on your Web site. Orders might come from different users, and the request to increment the counter might come from different threads. Which of the following code samples increments the orders integer and guarantees accurate results? - VB.NET

    A
    orders += 1

    B
    SyncLock orders
    orders += 1
    End SyncLock

    C
    Interlocked.Increment(orders)

    D
    Dim rwl As New ReaderWriterLock()
    rwl.AcquireReaderLock(10000)
    orders += 1
    rwl.ReleaseReaderLock()

    Note: Not available
    1. Report
  9. Question: Which of the following are valid reasons to create an application domain? (Choose all that apply.)

    A
    It is the only way to start a separate process.

    B
    You can remove the application domain to free up resources.

    C
    Application domains improve performance.

    D
    Application domains provide a layer of separation and security.

    Note: Not available
    1. Report
  10. Question: Which of the following are valid ways to run an assembly within an application domain? (Choose all that apply.)

    A
    AppDomain.CreateDomain

    B
    AppDomain.ExecuteAssembly

    C
    AppDomain.ExecuteAssemblyByName

    D
    AppDomain.ApplicationIdentity

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