Ensurepass QUESTION  141 You are creating an application that provides information about the local computer. The application contains a form that lists each logical drive along with the drive properties, such as type, volume label, and capacity. You need to write a procedure that retrieves properties of each logical drive on the local computer. What should you do? To answer, move the three appropriate actions from the list of actions to the answer area and arrange them in the correct order   Select Read more [...]
Ensurepass QUESTION 131 You are developing a utility screen for a new client application. The utility screen displays a thermometer that conveys the current status of processes being carried out by the application. You need to draw a rectangle on the screen to serve as the background of the thermometer as shown in the exhibit. The rectangle must be filled with gradient shading. (Click the Exhibit button.) Which code segment should you choose? A. RectangleF rectangle = new RectangleF(10f, Read more [...]
Ensurepass QUESTION 121 A BooleanSwitch instance has been created in the OrderProcessingSteps.es file to enable detailed logging during testing. You need to ensure that the order-processing service logs all steps. Which code segment should you add to the order-processing service' s configuration? A. <system.diagnostics> <switches> <add name="LogSteps" value="l" /> </switches> </system.diagnostics> B. <appSettings> <add key="Oi:derProcessingSteps.LogSteps" Read more [...]
EnsurepassQUESTION 111 You need to retrieve all queued e-mail messages into a collection and ensure type safety. Which code segment should you use to define the signature of the GetQueuedEmailsFromDb() method in the Poller.cs file? A. private static object[] GetQueuedEmailsFromDb(int queueID) B. private static ArrayList GetQueuedEmailsFromDb(int queueID) C. private static EmailMessages GetQueuedEmailsFromDb(int queueID) D. private static IList<object> GetQueuedEmailsFromDb(int queueID) Read more [...]
EnsurepassQUESTION 101 You develop an application that appends text to existing text files. You need to write a code segment that enables the application to append text to a file named C: MyFile.txt. The application must throw an exception if the file does not exist. You need to ensure that the other applications can read but not modify the file. Which code segment should you use? A. FileStream fs = new FileStream(@"C:MyFile.txt", FileMode.Open, FileAccess.ReadWrite, FileShare.Read); Read more [...]
EnsurepassQUESTION 91 Which methods allow COM components to be used in .NET applications? (Choose all that applay.) A. Add a reference to the component throudh Microsoft Visual Studio 2005. B. Use the type Library Import tool (TlbImport.exe). C. Use the Regsvr32 tool. D. Ensure thet the application is registered, using the RegSvr tool if necessary. Then either add a reference to it from the COM tab of the Add Reference dialog box or use TblIpm.exe. Correct Answer: ABD QUESTION 92 What Read more [...]
EnsurepassQUESTION 81 You create Microsoft Windows-based applications. You create an application that requires users to be authenticated by a domain controller. The application contains a series of processor intensive method calls that require different database connections. A bug is reported during testing. The bug description states that the application hangs during one of the processor-intensive calls more than 50 percent of the times when the method is executed. Your unit test for the same Read more [...]
EnsurepassQUESTION 71 You need to return the contents of an isolated storage file as a string. The file is machine-scoped and is named Settings.dat. Which code segment should you use? A. IsolatedStorageFileStream isoStream; isoStream = new IsolatedStorageFileStream("Settings.dat", FileMode.Open); string result = new StreamReader(isoStream).ReadToEnd(); B. IsolatedStorageFile isoFile; isoFile = IsolatedStorageFile.GetMachineStoreForAssembly(); IsolatedStorageFileStream isoStream; isoStream Read more [...]
EnsurepassQUESTION 61 You are developing a fiscal report for a customer. Your customer has a main office in the United States and a satellite office in Mexico. You need to ensure that when users in the satellite office generate the report, the current date is displayed in Mexican Spanish format. Which code segment should you use? A. Calendar cal = new CultureInfo("es-MX", false).Calendar; DateTime dt = new DateTime(DateTime.Today.Year, DateTime.Today.Month, DateTime.Today.Day); Strong Read more [...]
EnsurepassQUESTION 51 You need to select a class that is optimized for key-based item retrieval from both small and large collections. Which class should you choose? A. OrderedDictionary class B. HybridDictionary class C. ListDictionary class D. Hashtable class Correct Answer: B QUESTION 52 You are creating an undo buffer that stores data modifications. You need to ensure that the undo functionality undoes the most recent data modifications first. You also need to ensure that the undo Read more [...]
EnsurepassQUESTION 41 You develop a service application named PollingService that periodically calls long-running procedures. These procedures are called from the DoWork method. You use the following service application code: partial class PollingService : ServiceBase { bool blnExit = false; public PollingService() {} protected override void OnStart(string[] args) { do { DoWork();} while (!blnExit); } protected override void OnStop() { blnExit = true; } private void DoWork() { ...} } When Read more [...]