Ensurepass        QUESTION 11 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server database.   The application has two DataTable objects that reference the Customers and Orders tables in the database.   The application contains the following code segment. (Line numbers are included for reference only.)   01 DataSet customerOrders = new DataSet();   02 customerOrders.EnforceConstraints Read more [...]
Ensurepass  QUESTION 1 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.   The application contains the following XML document.   <bib>   <book title="TCP/IP Illustrated" year="1994">   <author> Author1 </author>   </book>   <book title="Programming in Unix" year="1992">   <author> Author1 </author>   <author> Author2 </author>   <author> Read more [...]
Ensurepass  Topic 2, VB Scenario   Background You are updating an existing Microsoft .NET Framework 4 application that includes a data layer built with ADO.NET Entity Framework 4. The application communicates with a Microsoft SQL Server 2008 instance named INST01 on a server named SQL01. The application stores data in a database named Contoso in the INST01 instance.   You need to update the existing technology and develop new functionality by using Microsoft Visual Studio 2010.   Read more [...]
Ensurepass    Topic 1, C# Scenario   Background You are updating an existing Microsoft .NET Framework 4 application that includes a data layer built with ADO.NET Entity Framework 4. The application communicates with a Microsoft SQL Server 2008 instance named INST01 on a server named SQL01. The application stores data in a database named Contoso in the INST01 instance.   You need to update the existing technology and develop new functionality by using Microsoft Visual Studio 2010. Read more [...]
Ensurepass  QUESTION 151 You are modifying an application that processes loans. The following code defines the Loan class. (Line numbers are included for reference only.)     Loans are restricted to a maximum term of 10 years. The application must send a notification message if a loan request exceeds 10 years.   You need to implement the notification mechanism.   Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)   Read more [...]
Ensurepass  QUESTION 141 You are troubleshooting an application that uses a class named FullName. The class is decorated with the DataContractAttribute attribute. The application includes the following code. (Line numbers are included for reference only.)     You need to ensure that the entire FullName object is serialized to the memory stream object.   Which code segment should you insert at line 09?   A. binary.WriteEndDocument(); B. binary.WriteEndDocumentAsync(); Read more [...]
Ensurepass  QUESTION 131 You are developing an application that retrieves patient data from a web service. The application stores the JSON messages returned from the web service in a string variable named PatientAsJson. The variable is encoded as UTF-8. The application includes a class named Patient that is defined by the following code:     You need to populate the Patient class with the data returned from the web service.   Which code segment should you use?     Read more [...]
Ensurepass  QUESTION 121 HOTSPOT You are building a data access layer in an application that contains the following code:     For each of the following statements, select Yes if the statement is true. Otherwise, select No.     Correct Answer:     QUESTION 122 HOTSPOT You have the following code:     For each of the following statements, select Yes if the statement is true. Otherwise, select No.     Correct Answer:     QUESTION Read more [...]
Ensurepass  QUESTION 111 You are developing an application that includes the following code segment. (Line numbers are included for reference only.)     You need to ensure that the DoWork(Widget widget) method runs.   With which code segment should you replace line 24?   A. DoWork((Widget)o); B. DoWork(new Widget(o)); C. DoWork(o is Widget); D. DoWork((ItemBase)o);   Correct Answer: A                 QUESTION 112 Read more [...]
Ensurepass  QUESTION 101 You are developing an application.   The application contains the following code segment (line numbers are included for reference only):     When you run the code, you receive the following error message: "Cannot implicitly convert type 'object'' to 'int'. An explicit conversion exists (are you missing a cast?)."   You need to ensure that the code can be compiled. Which code should you use to replace line 05?   A. var2 = arra1[0] is int; Read more [...]
Ensurepass  QUESTION 91 You are developing code for a class named Account. The Account class includes the following method:     You need to ensure that overflow exceptions are thrown when there is an error.   Which type of block should you use?   A. checked B. try C. using D. unchecked   Correct Answer: A                   QUESTION 92 You are developing an application that uses a .config file.   The relevant Read more [...]