nerdexam
Microsoft

70-516 · Question #67

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The configuration file contains the following code segment. <configuration> <connectionStrings> <add…

The correct answer is A. varconnectionString=ConfigurationManager. See the full explanation below for the reasoning.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The configuration file contains the following code segment. <configuration> <connectionStrings> <add name="AdventureWorksLT" connectionString="DataSource=SQL01;InitialCatalog=AdventureWorksLT;Inte gratedSecurity=True;" providerName="System.Data.SqlClient"/> </connectionStrings> </configuration> You need to retrieve the connection string named AdventureWorksLT from the configuration file. Which line of code should you use?

Options

  • AvarconnectionString=ConfigurationManager.
  • BvarconnectionString=ConfigurationManager.
  • CvarconnectionString=ConfigurationManager.
  • DvarconnectionString=ConfigurationSettings.

How the community answered

(61 responses)
  • A
    84% (51)
  • B
    2% (1)
  • C
    5% (3)
  • D
    10% (6)

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice