Microsoft Certified Solutions Developer (MCSD) For 2019 Set 2

If a class has managed resources and no unmanaged resources, it should do which of the following?



Options are :

  • a. Implement IDisposable and provide a destructor.
  • c. Not implement IDisposable and provide a destructor.
  • b. Implement IDisposable and not provide a destructor.
  • d. Not implement IDisposable and not provide a destructor.

Answer : b. Implement IDisposable and not provide a destructor.

Which of the following regular expressions matches the Social Security number format

###-##-#### where # is any digit?



Options are :

  • d. ^[0-9]3-[0-9]2-[0-9]4$
  • c. ^\d{3}-\d{2}-\d{4}$
  • b. ^\d3-\d2-\d4$
  • a. ^###-##-####$

Answer : c. ^\d{3}-\d{2}-\d{4}$

Which of the following code snippets will you use to calculate the secure hash of a byte array called userData? If you already have created an algorithm object called sha.



Options are :

  • c. sha.GetHash(userData);
  • a. userData.GetHashCode(sha);
  • b. sha.ComputeHash(userData);
  • d. sha.EncryptHash(userData);

Answer : b. sha.ComputeHash(userData);

If the user types an invalid value into a TextBox and moves focus to another TextBox, which of the following actions would be inappropriate for the program to take?



Options are :

  • c. Change the first TextBox’s font to indicate the error.
  • b. Change the first TextBox’s background color to indicate the error.
  • d. Display an asterisk next to the first TextBox to indicate the error.
  • a. Force focus back into the TextBox that contains the error.

Answer : a. Force focus back into the TextBox that contains the error.

70-515 Web Applications Development with Microsoft .NET Exam Set 1

Which of the following statements about assertions is true?



Options are :

  • a. The Debug.Assert method is ignored in release builds.
  • d. All the above.
  • b. The program must continue running even if a Debug.Assert method stops the program.
  • c. When an assertion fails in debug builds, the Debug.Assert method lets you halt, debug the program, or continue running.

Answer : d. All the above.

You are a developer at company xyx. You have been asked to implement a method to safely save and restore data on the local machine. What kind of algorithm best fits the requirements?



Options are :

  • d. X509Certificate
  • e. None of the above
  • b. Asymmetric algorithm
  • c. Hashing algorithm
  • a. Symmetric algorithm

Answer : a. Symmetric algorithm

Microsoft 70-647 Windows Enterprise Administrator Exam Set 2

In a multithreaded application how would you increment a variable called counter in a lock free manner?



Options are :

  • c. Interlocked.Add(ref counter, 1);
  • b. counter++;
  • d. Interlocked.Increment (counter);
  • a. lock(counter){counter++;}

Answer : c. Interlocked.Add(ref counter, 1);

Which collection would you use if you need to process the items in the collection on a last-infirst- out order?



Options are :

  • b. Queue
  • a. HashTable
  • c. Stack
  • d. List

Answer : c. Stack

Which object does the variable mySet inherit from?

Int[ ] mySet = new int[5];



Options are :

  • b. System.Collection.List
  • d. None, this is a value type.
  • c. System.Array
  • a. System.Collection

Answer : c. System.Array

Microsoft Windows Server 2016 Certification: Exam 70-741 Set 3

Which collection would you use if you need to process the items in the collection on first-infirst- out order?



Options are :

  • c. Stack
  • d. List
  • b. Queue
  • a. HashTable

Answer : b. Queue

Which methods can you use to find the first item in a sequence?



Options are :

  • c. Skip
  • b. First
  • a. Min

Answer : b. First

70-646 Pro Windows Server 2008 - Server Administrator Exam Set 3

Which ADO.NET Command object’s property would you use when a query returns the SUM of a column in a table?



Options are :

  • d. Execute
  • b. ExecuteDataReader
  • a. ExecuteNonQuery
  • c. ExecuteScalar

Answer : c. ExecuteScalar

Which of the following regular expressions matches a username that must include between 6 and 16 letters, numbers, and underscores?



Options are :

  • b. ^[a-zA-Z0-9_]{6,16}$
  • a. ^[a-zA-Z0-9_]?{6}$
  • d. ^\w{16}?$
  • c. ^[A-Z0-9a-z_]?$

Answer : b. ^[a-zA-Z0-9_]{6,16}$

Which Command object’s method would you use to execute a query that does not return any results?



Options are :

  • b. ExecuteDataReader
  • d. Execute
  • a. ExecuteNonQuery
  • c. ExecuteScalar

Answer : a. ExecuteNonQuery

Microsoft Certified Solutions Developer (MCSD) For 2019 Set 2

Which clause orders the state and then the city?



Options are :

  • b. orderby h.State thenby h.City
  • d. orderby h.State, thenby h.City
  • a. orderby h.State orderby h.City
  • c. orderby h.State, h.City

Answer : d. orderby h.State, thenby h.City

Which answer has the correct order of keywords for a LINQ query expression?



Options are :

  • c. from, where, select
  • d. from, select, where
  • a. select, from, where
  • b. where, from, select

Answer : c. from, where, select

Which of the following regular expressions matches license plate values that must include three uppercase letters followed by a space and three digits, or three digits followed by a space and three uppercase letters?



Options are :

  • a. (^\d{3} [A-Z]{3}$)|(^[A-Z]{3} \d{3}$)
  • d. ^(\d{3} [A-Z]{3})?$
  • c. ^\w{3} \d{3}|\d{3} \w{3}$
  • b. ^\d{3} [A-Z]{3} [A-Z]{3} \d{3}$

Answer : a. (^\d{3} [A-Z]{3}$)|(^[A-Z]{3} \d{3}$)

70-662 Microsoft Exchange Server 2010 Configuring Exam Set 3

Which ADO.NET object is a forward only cursor and is connected to the database while the cursor is open?



Options are :

  • a. DBDataReader
  • c. DataTable
  • b. DataSet
  • d. DataAdapter

Answer : a. DBDataReader

Which collection would you use if you need to quickly find an element by its key rather than its index?



Options are :

  • b. List
  • c. Queue
  • a. Dictionary

Answer : a. Dictionary

Which of the following methods returns true if a regular expression matches a string?



Options are :

  • b. Regex.IsMatch
  • c. Regexp.Matches
  • d. String.Matches
  • a. Regex.Matches

Answer : b. Regex.IsMatch

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

Which of the following statements about the Debug and Trace classes is true?



Options are :

  • c. The Debug and Trace classes both generate messages if DEBUG is defined.
  • d. The Debug and Trace classes both generate messages if TRACE is defined.
  • a. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if both DEBUG and TRACE are defined.
  • b. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if TRACE is defined.

Answer : b. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if TRACE is defined.

You are a developer at the company xyx. You have been asked to implement a method to safely send data to another machine. What kind of algorithm best fits the requirements?



Options are :

  • d. X509Certificate
  • c. Hashing algorithm
  • a. Symmetric algorithm
  • e. None of the above
  • b. Asymmetric algorithm

Answer : b. Asymmetric algorithm

If the user is typing data into a TextBox and types an invalid character, which of the following actions would be inappropriate for the program to take?



Options are :

  • d. Display a message box telling the user that there is an error.
  • b. Silently discard the character.
  • c. Display an asterisk next to the TextBox to indicate the error.
  • a. Change the TextBox’s background color to indicate the error.

Answer : d. Display a message box telling the user that there is an error.

Microsoft 70-642 Windows Server Network Infrastructure Exam Set 3

Which where clause returns all integers between 10 and 20?



Options are :

  • d. where i gt 10 && i lt 20
  • a. where i >= 10 and i <= 20
  • c. where i gt 10 and i lt 20
  • b. where i >= 10 && i <= 20

Answer : b. where i >= 10 && i <= 20

Which where clause can select all integers in the myList object that are even numbers given the following from clause?

   from i in myList



Options are :

  • b. where i % 2 = 0
  • a. where myList.Contains(i % 2)
  • c. where i % 2 == 0
  • d. where i % 2 equals 0

Answer : c. where i % 2 == 0

Which of the following code snippets will you use to encrypt an array called userData that can be decrypted by anyone logged in on the current machine, and without using any entropy?



Options are :

  • b. ProtectedData.Protect(userData, null, DataProtectionScope.LocalMachine);
  • a. ProtectedData.Protect(userData, null, DataProtectionScope.CurrentUser);
  • d. ProtectedData.Unprotect(userData, null, DataProtectionScope.LocalMachine);
  • c. ProtectedData.Encrypt(userData, null, DataProtectionScope.CurrentUser);

Answer : b. ProtectedData.Protect(userData, null, DataProtectionScope.LocalMachine);

70-642 Windows Server 2008 Network Infrastructure Exam Set 7

Which statement selects an anonymous type?



Options are :

  • b. select h
  • a. select { h.City, h.State }
  • d. select h.City, h.State
  • c. select new { h.City, h.State }

Answer : c. select new { h.City, h.State }

Which method can you use to find the minimum value in a sequence?



Options are :

  • a. (from i in myArray select i).Min()
  • b. from i in myArray select Min(i)
  • c. from Min(i) in myArray select i
  • d. from i in Min(myArray) select i

Answer : a. (from i in myArray select i).Min()

Which of the following statements about the Debug and Trace classes is true?



Options are :

  • c. The Debug and Trace classes both generate messages if DEBUG is defined.
  • b. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if TRACE is defined.
  • a. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if both DEBUG and TRACE are defined.
  • d. The Debug and Trace classes both generate messages if TRACE is defined.

Answer : b. The Debug class generates messages if DEBUG is defined. The Trace class generates messages if TRACE is defined.

70-642 Windows Server 2008 Network Infrastructure Exam Set 3

Which Command object’s method would you use to execute a query that returns only one row and one column?



Options are :

  • d. Execute
  • c. ExecuteScalar
  • a. ExecuteNonQuery
  • b. ExecuteDataReader

Answer : c. ExecuteScalar

What describes a strong name assembly?



Options are :

  • a. Name
  • d. Culture
  • e. Processor Architecture
  • b. Version
  • f. All the above
  • c. Public key token

Answer : f. All the above

Which ADO.NET object is used to connect to a database?



Options are :

  • a. Database
  • d. DataAdapter
  • c. Command
  • b. Connection

Answer : b. Connection

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

How can you deploy a private assembly?



Options are :

  • b. By adding a reference to the assembly in Visual Studio
  • c. By copying the file in C:\Windows folder
  • a. By running gacutil.exe

Answer : b. By adding a reference to the assembly in Visual Studio

You are a developer at the company xyx. You have been asked to implement a method to handle password encryption without offering the possibility to restore the password. What kind of algorithm best fits the requirements?



Options are :

  • c. Hashing algorithm
  • a. Symmetric algorithm
  • d. X509Certificate
  • e. None of the above
  • b. Asymmetric algorithm

Answer : c. Hashing algorithm

If the user enters some invalid data on a form and then clicks the form’s Accept button, which of the following actions would be appropriate for the program take?



Options are :

  • a. Change the background color of TextBoxes containing invalid values to indicate the errors.
  • b. Display a message box telling the user that there is an error.
  • d. All the above.
  • c. Do not close the form until the user corrects all the errors.

Answer : d. All the above.

Microsoft 70-642 Windows Server Network Infrastructure Exam Set 6

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions