You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server 2008 database. You must to retrieve a connection
string. Wich the correct form.
A.
string connectionString = ConfigurationSettings.AppSettings[“connectionString”];
B.
string connectionString = ConfigurationManager.AppSettings[“connectionString”];
C.
string connectionString = ApplicationManager.ConnectionStrings[“connectionString”];
D.
string connectionString =
ConfigurationManager.ConnectionStrings[“connectionString”].ConnectionString;
Explanation:
CHAPTER 2 ADO.NET Connected Classes
Lesson 1: Connecting to the Data Store
Storing the Connection String in the Application Configuration File (page 75)