question archive You are a developer at company xyx

You are a developer at company xyx

Subject:Computer SciencePrice:2.89 Bought3

You are a developer at company xyx. You have been asked to improve the responsiveness of your WPF application. Which solution best fits the requirements?
a.Use the BackgroundWorker class.
b.Use the LongRunningMethod class.
c.Run the method in the UI thread.
d.Use the WorkInBackground class.
e.None of the above.
2.How do you execute a method as a task?
a.Create a new Task object, and then call the Start method on the newly created object.
b.Create the task via the Task.Run method.
c.Create the task via the Task.Factory.StartNew method.
d.All the above.
e.None of the above.
3.Which of the following is not a locking mechanism?
a.Monitor
b.Semaphore
c.Mutex
d.async
4.How can you schedule work to be done by a thread from the thread pool?
a.You create a new object of type ThreadPool, and then you call the Start method.
b.You call the ThreadPool.Run method.
c.You call the ThreadPool.QueueUserWorkItem method.
d.You create a new thread and set its property IsThreadPool to true.
e.You call ContinueWith on a running thread from the thread pool.
5.Which of the following are methods of the Parallel class?
a.Run
b.Invoke
c.For
d.ForEach
e.Parallel
6.Which method can you use to cancel an ongoing operation that uses CancelationToken?
a.Call Cancel method on the CancelationToken
b.Call Cancel method on the CancelationTokenSource object that was used to create the CancelationToken
c.Call Abort method on the CancelationToken
d.Call Abort method on the CancelationTokenSource object that was used to create the CancelationToken
7.Which method would you call when you use a barrier to mark that a participant reached that point?
a.Signal
b.Wait
c.SignalAndWait
d.RemoveParticipant
e.JoinParticipant
8.What code is equivalent with lock(syncObject){...}?
a.Monitor.Lock(syncObject) {...}
b.Monitor.TryEnter(syncObject) {...}
c.Monitor.Enter(syncObject); try{...} finally{ Monitor.Exit(syncObject); }
d.Monitor.Lock(syncObject); try{...} catch{ Monitor.Unlock(syncObject); }
9.In a multithreaded application how would you increment a variable called counter in a lock free manner? Choose all that apply.
a.lock(counter){counter++;}
b.counter++;
c.Interlocked.Add(ref counter, 1);
d.Interlocked.Increment (counter);
e.Interlocked.Increment (ref counter);
10.Which method will you use to signal and EventWaitHandle?
a.Signal
b.Wait
c.Set
d.Reset
e.SignalAndWait

Option 1

Low Cost Option
Download this past answer in few clicks

2.89 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 3 times

Completion Status 100%

Related Questions