Exam 70-536 : .NET Framework Application Development Foundation Part – 5

Question: You are developing an application to perform mathematical calculations. You develop a class named CalculationValues. You write a procedure named PerformCalculation that operates on an instance of the class. You need to ensure that the user interface of the application continues to respond while calculations are being performed. You need to write a code segment that calls the PerformCalculation procedure to achieve this goal. Which code segment should you use?

Correct Answer: 4 Question: You are writing a method to compress an array of bytes. The array is passed to the method in a parameter … Click here to continue…..

Exam 70-536 : .NET Framework Application Development Foundation Part – 4

Question: 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? OrderedDictionary class HybridDictionary class ListDictionary class Hashtable class Correct Answer: 2 Question: You are developing a custom-collection class. You need to create a method in your class. You need to ensure that the method you create in your class returns a type that is compatible with the Foreach statement. Which criterion should the method meet? The method must return a type of either IEnumerator or IEnumerable. The method must return a type of IComparable. The … Click here to continue…..

Exam 70-536 : .NET Framework Application Development Foundation Part – 3

Question: You need to create a method to clear a Queue named q. Which code segment should you use? foreach (object e in q) { q.Dequeue(); } foreach (object e in q) { Enqueue(null); } q.Clear(); q.Dequeue(); Correct Answer: 3 Question: 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?

Correct Answer: 2 Question: You are creating a class to compare a specially-formatted string. The default collation comparisons do not apply. You need to implement the IComparable<string> … Click here to continue…..

Exam 70-536 : .NET Framework Application Development Foundation Part – 2

Question: You are writing a method to compress an array of bytes. The bytes to be compressed are passed to the method in a parameter named document. You need to compress the contents of the incoming parameter. Which code segment should you use?

Correct Answer: 3 Question: You develop a service application named FileService. You deploy the service application to multiple servers on your network. You implement the following code segment. (Line numbers are included for reference only.) 01 public void StartService(string serverName){ 02 ServiceController crtl = new 03 ServiceController(“FileService”); 04 if (crtl.Status == ServiceControllerStatus.Stopped){ 05 … Click here to continue…..

Exam 70-536 : .NET Framework Application Development Foundation Part – 1

Question: You need to identify a type that meets the following criteria: Is always a number. Is not greater than 65,535. Which type should you choose? System.UInt16 int System.String System.IntPtr Correct Answer: 1 Question: Your application uses two threads, named threadOne and threadTwo. You need to modify the code to prevent the execution of threadOne until threadTwo completes execution. What should you do? Configure threadOne to run at a lower priority. Configure threadTwo to run at a higher priority. Use a WaitCallback delegate to synchronize the threads. Call the Sleep method of threadOne. Call the SpinLock method of threadOne. Correct … Click here to continue…..