Microsoft Certified Solutions Developer (MCSD) For 2019 Set 1

A program can use the IEnumerable and IEnumerator interfaces to do which of the following?



Options are :

  • a. Use MoveNext and Reset to move through a list of objects.
  • b. Use foreach to move through a list of objects.
  • d. Use the yield return statement to make a list of objects for iteration.
  • c. Move through a list of objects by index.

Answer : a. Use MoveNext and Reset to move through a list of objects.

Microsoft Dynamics Expand and Test Your Skills Practice Test Set 2

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?



Options are :

  • a. Use the BackgroundWorker class.
  • d. Use the WorkInBackground class.
  • e. None of the above.
  • b. Use the LongRunningMethod class.
  • c. Run the method in the UI thread.

Answer : a. Use the BackgroundWorker class.

Which class in the System.Reflection namespace would you use if you want to determine

all the classes contained in a DLL file?



Options are :

  • b. Assembly
  • a. FileInfo
  • d. Module
  • c. Type

Answer : b. Assembly

How can you schedule work to be done by a thread from the thread pool?



Options are :

  • e. You call ContinueWith on a running thread from the thread pool.
  • b. You call the ThreadPool.Run method.
  • d. You create a new thread and set its property IsThreadPool to true.
  • a. You create a new object of type ThreadPool, and then you call the Start method.
  • c. You call the ThreadPool.QueueUserWorkItem method.

Answer : c. You call the ThreadPool.QueueUserWorkItem method.

70-642 Windows Server 2008 Network Infrastructure Exam Set 4

If a class implements IDisposable, its Dispose method should do which of the following?



Options are :

  • a. Free managed resources.
  • b. Free unmanaged resources.
  • c. Call GC.SuppressFinalize.
  • d. All of the above.

Answer : d. All of the above.

Which of the following statements about destructors is false?



Options are :

  • c. Destructors are inherited.
  • b. Destructors cannot assume that other managed objects exist while they are executing.
  • d. Destructors cannot be overloaded.
  • a. Destructors are called automatically.

Answer : c. Destructors are inherited.

How do you execute a method as a task?



Options are :

  • b. Create the task via the Task.Run method.
  • c. Create the task via the Task.Factory.StartNew method.
  • e. None of the above.
  • d. All the above.
  • a. Create a new Task object, and then call the Start method on the newly created object.

Answer : d. All the above.

Microsoft 70-647 Windows Enterprise Administrator Exam Set 5

If you create a custom class that is going to be used as elements in a List object and you want to use the Sort method of the List object to sort the elements in the array, what steps must you take when coding the custom class?



Options are :

  • b. Inherit from the IComparable interface. Implement the CompareTo method.
  • d. Inherit from the List class. Implement the Sort method.
  • a. Inherit from the ICompare interface. Implement the Comparable method.
  • c. Inherit from the System.Array class. Override the Sort method.

Answer : b. Inherit from the IComparable interface. Implement the CompareTo method.

You are asked to create a custom attribute that has a single property, called Version, that allows the caller to determine the version of a method. Which code can create the attribute?



Options are :

  • c. class MyCustomAttribute : System.AttributeUsage { public string Version { get; set; } }
  • a. class MyCustomAttribute :System.Reflection.Attribute { public string Version { get; set; } }
  • b. class MyCustomAttribute : System.Attribute { public string Version { get; set; } }
  • d. class MyCustomAttribute : System.ClassAttribute { public string Version { get; set; } }

Answer : b. class MyCustomAttribute : System.Attribute { public string Version { get; set; } }

Which of the following is not a locking mechanism?



Options are :

  • c. Mutex
  • b. Semaphore
  • d. async
  • a. Monitor

Answer : d. async

Microsoft 70-647 Windows Enterprise Administrator Exam Set 4

Which of the following statements is true?



Options are :

  • d. A class can inherit from any number of classes and implement at most one interface.
  • a. A class can inherit from at most one class and implement at most one interface.
  • b. A class can inherit from any number classes and implement any number of interfaces.
  • c. A class can inherit from at most one class and implement any number of interfaces.

Answer : c. A class can inherit from at most one class and implement any number of interfaces.

Which method of the Assembly class allows you to get all the public types defined in the Assembly?



Options are :

  • a. DefinedTypes
  • d. GetModules
  • c. GetExportedTypes
  • b. Types

Answer : c. GetExportedTypes

Which of the following statements is not true of delegate variables?



Options are :

  • a. You need to use a cast operator to execute the method to which a delegate variable refers.
  • d. You can use addition to combine delegate variables into a series of methods and use subtraction to remove a method from a series.
  • b. A struct or class can contain fields that are delegate variables.
  • c. You can make an array or list of delegate variables.

Answer : a. You need to use a cast operator to execute the method to which a delegate variable refers.

Microsoft 70-642 Windows Server Network Infrastructure Exam Set 8

If the Employee class inherits from the Person class, covariance lets you do which of

the following?



Options are :

  • a. Store a method that returns a Person in a delegate that represents methods that return an Employee.
  • c. Store a method that takes a Person as a parameter in a delegate that represents methods that take an Employee as a parameter.
  • d. Store a method that takes an Employee as a parameter in a delegate that represents methods that take a Person as a parameter.
  • b. Store a method that returns an Employee in a delegate that represents methods that return a Person.

Answer : b. Store a method that returns an Employee in a delegate that represents methods that return a Person.

Which of the following are methods of the Parallel class?



Options are :

  • c. For
  • a. Run
  • b. Invoke
  • e. Parallel
  • d. ForEach

Answer : b. Invoke

What code is equivalent with lock(syncObject){}?



Options are :

  • a. Monitor.Lock(syncObject) {}
  • c. Monitor.Enter(syncObject); try{} finally{ Monitor.Exit(syncObject); }
  • b. Monitor.TryEnter(syncObject) {}
  • d. Monitor.Lock(syncObject); try{} catch{ Monitor.Unlock(syncObject); }

Answer : c. Monitor.Enter(syncObject); try{} finally{ Monitor.Exit(syncObject); }

Microsoft 70-642 Windows Server Network Infrastructure Exam Set 1

Which code can create a lambda expression?



Options are :

  • d. delegate MySub(); MySub ms = x * x;
  • c. x => x * x;
  • b. delegate MySub(double x); MySub ms = delegate(double y) { y * y; }
  • a. delegate x = x => 5 + 5;

Answer : c. x => x * x;

In the variable declaration Action<Order> processor, the variable processor represents which of the following?



Options are :

  • b. Methods that take an Order object as a parameter and return void.
  • c. Methods that take an Order object as a parameter and return an Order object.
  • d. Methods provided by the Action class that take no parameters and return void.
  • a. Methods that take no parameters and return an Order object.

Answer : b. Methods that take an Order object as a parameter and return void.

You are given an assignment to create a code generator to automate the task of creating

repetitive code. Which namespace contains the types needed to generate code?



Options are :

  • d. System.CodeDom
  • b. CodeDom
  • c. Reflection
  • a. System.Reflection

Answer : d. System.CodeDom

70-513 WCF Development with Microsoft .NET Framework 4 Exam Set 4

Which type should you use to store objects of different types but do not know how many elements you need at the time of creation?



Options are :

  • b. List
  • a. Collection
  • c. Stack
  • d. ArrayList

Answer : d. ArrayList

Which of the following statements about garbage collection is false?



Options are :

  • a. In general, you can't tell when the GC will perform garbage collection.
  • c. An object's Dispose method can call GC.SuppressFinalize to prevent the GC from calling the object's destructor.
  • d. Before destroying an object, the GC calls its Dispose method.
  • b. It is possible for a program to run without ever performing garbage collection.

Answer : d. Before destroying an object, the GC calls its Dispose method.

Which of the following statements about statement lambdas is false?



Options are :

  • a. A statement lambda can include more than one statement.
  • c. A statement lambda must use braces, { }.
  • b. A statement lambda cannot return a value.
  • d. If a statement lambda returns a value, it must use a return statement.

Answer : b. A statement lambda cannot return a value.

Microsoft 98-367 & 98-368 Certification Practical Exam Set 3

Which method can you use to cancel an ongoing operation that uses CancelationToken?



Options are :

  • c. Call Abort method on the CancelationToken
  • b. Call Cancel method on the CancelationTokenSource object that was used to create the CancelationToken
  • d. Call Abort method on the CancelationTokenSource object that was used to create the CancelationToken
  • a. Call Cancel method on the CancelationToken

Answer : b. Call Cancel method on the CancelationTokenSource object that was used to create the CancelationToken

Suppose the variable result is declared by the statement Func<float, float> result.

Which of the following correctly initializes result to an expression lambda?



Options are :

  • b. result = (x) => return x * x;
  • d. Both a and c are correct.
  • c. result = x => x * x;
  • a. result = (float x) => x * x;

Answer : d. Both a and c are correct.

Suppose the variable note is declared by the statement Action note. Then which of the following correctly initializes note to an expression lambda?



Options are :

  • a. note = { return x * x; };
  • d. note = MessageBox.Show("Hi");
  • c. note = () => MessageBox.Show("Hi");
  • b. note = () { return x * x; };

Answer : c. note = () => MessageBox.Show("Hi");

70-662 Microsoft Exchange Server 2010 Configuring Exam Set 1

Suppose F is declared by the statement Func<float, float> F. Then which of the following correctly initializes F to an anonymous method?



Options are :

  • c. F = float Func(float x) { return x * x; };
  • a. F = (float x) { return x * x; };
  • b. F = delegate { return x * x; };
  • d. F = delegate(float x) { return x * x; };

Answer : d. F = delegate(float x) { return x * x; };

In the variable declaration Func<Order> processor, the variable processor represents which of the following?



Options are :

  • a. Methods that take no parameters and return an Order object.
  • c. Methods that take an Order object as a parameter and return an Order object.
  • d. Methods provided by the Action class that take no parameters and return void.
  • b. Methods that take an Order object as a parameter and return void.

Answer : a. Methods that take no parameters and return an Order object.

You are consulting for a company called Contoso and are taking over an application that was built by a third-party software company. There is an executable that is currently not working because it is missing a DLL file that is referenced. How can you figure out which DLL files the application references?



Options are :

  • b. Create an instance of the Assembly class, load the assembly, and call the GetReferencedAssemblies method.
  • a. Create an instance of the Assembly class, load the assembly, and iterate through the ReferencedAssemblies property.
  • d. Create an instance of the Assembly class, load the assembly, and call the GetModulesReferenced method.
  • c. Create an instance of the Assembly class, load the assembly, and iterate through the Modules property.

Answer : b. Create an instance of the Assembly class, load the assembly, and call the GetReferencedAssemblies method.

Microsoft Dynamics Expand and Test Your Skills Practice Test Set 1

Which method will you use to signal and EventWaitHandle?



Options are :

  • a. Signal
  • b. Wait
  • d. Reset
  • c. Set

Answer : c. Set

Which method would you call when you use a barrier to mark that a participant reached that point?



Options are :

  • d. RemoveParticipant
  • e. JoinParticipant
  • a. Signal
  • c. SignalAndWait
  • b. Wait

Answer : c. SignalAndWait

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions