Microsoft PRO: Design & Develop Wndws Apps Using MS .NET Framework 4 Sample Questions:
1. You are designing a Windows Presentation Foundation (WPF) application that accesses a business tier. The business tier is implemented as a Windows Communication Foundation (WCF) service and stores data in a Microsoft SQL Server 2008 database.
The WCF service will be accessed by external applications that do not use the .NET Framework.
You need to recommend an approach for passing data between layers.
What should you recommend?
A) Use custom .NET classes with XML serialization.
B) Use a DataSet object.
C) Use the DiffGram XML format.
D) Use custom .NET classes with binary serialization.
2. You are designing a Windows Presentation Foundation (WPF) client application that requests reports from a Windows Communication Foundation (WCF) Web service.
Users must be able to perform other tasks while the WCF Web service generates the report.
You need to recommend a message exchange pattern for the communication between the WPF application and the WCF Web service.
What are two possible message exchange patterns that will meet the requirements? (Each correct answer presents a complete solution, Choose two.)
A) Datagram without session
B) Datagram with session
C) Duplex
D) Request-Response
3. You are updating a Windows desktop client application that was created by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010.
The application displays data derived from several database queries. The display takes a long time to update.
The application currently uses a BackgroundWorker thread and a Parallel.ForEach statement on that thread.
Users have requested a modification to the program that would allow them to interrupt the display of data and begin processing a new and different query.
You decide to provide a new Stop button on the user interface (UI) to allow the user to terminate the current data display and initiate the new query. The main UI thread must be notified when the current data processing is terminated so that the new query can be started.
You need to implement the Stop button event handler.
What should you do?
A) Use the DoWork handler of the worker thread and test a shared status value.
Use the Thread.Abort () statement to terminate the worker thread.
Start a new BackgroundWorker thread from the main UI thread.
B) Use the DoWork handler of the worker thread and test a shared status value.
Use a break statement to terminate the Parallel.ForEach loop.
C) Use a CancelAsync() function to cancel the worker thread.
In the Parallel.ForEach loop, test the CancellationPending property.
If the property is set to true, perform the following tasks:
Write a loopStatus.Stop() statement.
Set the DoWorkEventArgs.Cancel property to true.
Use a return statement to exit from the loop.
D) Use the DoWork handler of the worker thread and test a shared status value.
Use a loopStatus.Stop() statement to terminate the Parallel.ForEach loop.
4. You are packaging updates for multiple Windows Presentation Foundation (WPF) applications by using Microsoft .NET Framework 4.
Updates to the applications and to third-party control files are available. Updates to the applications have dependencies upon updates to the third-party control files. An update script is run at logon that allows only a single command to be executed.
You need to package the application updates and updates to the third party controls to ensure that they are successfully installed.
What should you do?
A) Package application updates as a single installer. Package third-party control files as a merge module.
B) Prepare the installers for individual application updates and include the third-party control files as individual files.
C) Package application updates as a single installer. Package third-party control files as a separate installer.
D) Prepare the installers for individual application updates and include the third-party control files as a merge module.
5. You are developing an application by using Microsoft .NET Framework 4.
The application will be used by all employees of your company. Local file stores on the computers are secure and inaccessible remotely.
You need to design a remote monitoring strategy to monitor the usage time of the application by each user.
What should you do?
A) Use the System.Management.Instrumentation namespace to publish startup, shutdown, and user idle time events of the application. Publish the events to Microsoft Operations Manager.
B) Create a TraceLog object by using the System.Diagnostics element in the application configuration file. Add the TraceSource element for startup, shutdown, and user idle time events.
C) Create a TraceLog object and the Trace object by using the System.Diagnostics element to trace startup, shutdown, and user idle time events throughout the application.
D) Use the System.Management.Instrumentation namespace to issue event queries against methods that pass ProgressEvent and StoppedEvent arguments. Publish the events to the Event Log.
Solutions:
| Question # 1 Answer: A | Question # 2 Answer: B,C | Question # 3 Answer: C | Question # 4 Answer: A | Question # 5 Answer: A |
We're so confident of our products that we provide no hassle product exchange.


By Page

