1.
You are creating a Windows Forms application by using the .NET Framework 3.5.
You create a new form in your application.
You add a PrintDocument control named pntDoc to the form.
To support the print functionality, you write the following code segment in the application
(Line numbers are included for reference only.)
01 pntDoc.BeginPrint += new.PrintEventHandler(PrintDoc_BeginPrint) ;
02
03 bool.canPrint = CheckPrintAccessControl() ;
04 if (!canPrint) {
05
06 }
07
You need to ensure that the following requirements are met:
- When the user has no print access, font and file stream initializations are not executed and the print operation is cancelled
- Print operations are logged whether or not the user has print access
What should you do ?
2.
You are creating a Windows Forms application that has the print functionality by using the .NET Framework
3.5.
You implement the PrintPage page event for the form.
You associate an instance of the PrintDocument control along with an instance of the PrintPreviewDialog control named prevDialog1.
You want to set the default size of the PrintPreviewDialog class to full screen.
You need to provide a print preview for the user by adding a code segment to the Click event of the button on the form.
Which code segment should you use ?
3.
You are creating a Windows Forms application by using the .NET Framework 3.5.
The application is configured to use rolebased security.
You need to ensure that users can print reports only by selecting a printer from the printer dialog box.
You want to achieve this goal by using the minimum level of permission.
Which code segment should you use?
4.
You are creating a Windows Forms application for the design of circuit boards and electronic equipment.
You use the .NET Framework 3.5 to create the application x that allows designers to preview designs before printing them.
The previewed documents must meet the following requirements:
- The graphics and text are displayed clearly
- The fullscale preview is set as default for the documents
- The zoom setting of the preview control is adjusted automatically when the form is resized
You need to ensure that the requirements are met when the form that contains the custom print preview control is displayed.
Which code segment should you use?
5.
You are creating a Windows Forms application by using the .NET Framework 3.5.
You have implemented the PrintPage event to send the page output to the printer.
The users must select the printer and the page range before printing.
You need to ensure that users can print the content of the form by clicking the button control.
Which code segment should you use?
6.
You are creating a Windows Forms application by using the .NET Framework 3.5.
The application stores a list of part numbers in an integer based array as shown in the following code segment
(Line numbers are included for reference only)
01 var parts = new int[]
02 { 105, 110, 110, 235, 105, 03 135, 137, 205, 105, 100, 100 } ;
03
04
05 foreach (var item in results) {
06 tbResults.Text.+= item + "\r\n";
07 }
You need to use a LINQ to Objects query to perform the following tasks:
- Obtain a list of duplicate part numbers
- Order the list by part numbers
- Provide the part numbers and the total count of part numbers in the results
Which code segment should you insert at line 04 ?
7.
You are creating a Windows Forms application by using the .NET Framework 3.5.
You use LINQ expressions to read a list of customers from the following XML file.
Paul Koch
Bob Kelly
Joe Healy
Matt Hink
Tom Perham
Jeff Hay
Kim Shane
Mike Ray


You need to obtain a list of names of customers who are 21 years of age or older.
Which code segment should you use ?
8.
You are creating a Windows Forms application for a courier company by using the .NET Framework 3.5.
You create a form that allows customers to track the progress of their shipments.
The form contains the following elements:
- A text box named txtTN that allows users to enter a tracking number
- An ErrorProvider control named ErrorProvider1 that informs users of an invalid tracking number
- A function named ValidTrackingNumber that validates tracking numbers
You need to ensure that the txtTN text box is validated, which code segment should you use?
9.
You are creating a Windows Forms application by using the .NET Framework 3.5 The application is used by a financial service provider.
You discover that the service provider transfers large amounts of data by using XML.
You need to read and validate the XMLdocuments in the most time efficient manner.
Which technology should you use?
10.
You are creating a Windows Forms application by using the .NET Framework 3.5.
You have resource files in five different languages.

You need to test the application in each language.
What should you do?