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?

  1. System.UInt16
  2. int
  3. System.String
  4. 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?

  1. Configure threadOne to run at a lower priority.
  2. Configure threadTwo to run at a higher priority.
  3. Use a WaitCallback delegate to synchronize the threads.
  4. Call the Sleep method of threadOne.
  5. Call the SpinLock method of threadOne.

Correct Answer: 3


Question: You write the following custom exception class named CustomException.
public class CustomException : ApplicationException
{
public static int COR_E_ARGUMENT = unchecked((int)0x80070057);
public CustomException(string msg) : base(msg)
{
HResult = COR_E_ARGUMENT;
}
}

You need to write a code segment that will use the CustomException class to immediately return control to the COM caller. You also need to ensure that the caller has access to the error code. Which code segment should you use?

  1. return Marshal.GetExceptionForHR(CustomException.COR_E_ARGUMENT);
  2. return CustomException.COR_E_ARGUMENT;
  3. Marshal.ThrowExceptionForHR(CustomException.COR_E_ARGUMENT);
  4. throw new CustomException(“Argument is out of bounds”);

Correct Answer: 4


Question: 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 buffer permits the storage of strings only. Which code segment should you use?

  1. Stack<string> undoBuffer = new Stack<string>();
  2. Stack undoBuffer = new Stack();
  3. Queue<string> undoBuffer = new Queue<string>();
  4. Queue undoBuffer = new Queue();

Correct Answer: 1


Question: You are developing an application to assist the user in conducting electronic surveys. The survey consists of 25 true-or-false questions. You need to perform the following tasks:

  • Initialize each answer to true.
  • Minimize the amount of memory used by each survey.

Which storage option should you choose?

  1. BitVector32 answers = new BitVector32(1);
  2. BitVector32 answers = new BitVector32(-1);
  3. BitArray answers = new BitArray(1);
  4. BitArray answers = new BitArray(-1);

Correct Answer: 2

Tagged . Bookmark the permalink.

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

  1. Gediminas Bukauskas says:

    Correct answer to first question is “int” – because System.Uint16 is correct for non-negative integers only.
    Answers to second question supplies only one and not most efficient solution: one can use Thread.Join method or use critical section (lock operator).

Leave a Reply