Bagikan melalui


ConnectionStringSettings Konstruktor

Definisi

Menginisialisasi instans baru kelas ConnectionStringSettings.

Overload

ConnectionStringSettings()

Menginisialisasi instans baru kelas ConnectionStringSettings.

ConnectionStringSettings(String, String)

Menginisialisasi instans baru kelas ConnectionStringSettings.

ConnectionStringSettings(String, String, String)

Menginisialisasi instans baru kelas ConnectionStringSettings.

ConnectionStringSettings()

Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs

Menginisialisasi instans baru kelas ConnectionStringSettings.

public:
 ConnectionStringSettings();
public ConnectionStringSettings ();
Public Sub New ()

Lihat juga

Berlaku untuk

ConnectionStringSettings(String, String)

Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs

Menginisialisasi instans baru kelas ConnectionStringSettings.

public:
 ConnectionStringSettings(System::String ^ name, System::String ^ connectionString);
public ConnectionStringSettings (string name, string connectionString);
new System.Configuration.ConnectionStringSettings : string * string -> System.Configuration.ConnectionStringSettings
Public Sub New (name As String, connectionString As String)

Parameter

name
String

Nama grup koneksi.

connectionString
String

String koneksi.

Lihat juga

Berlaku untuk

ConnectionStringSettings(String, String, String)

Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs
Sumber:
ConnectionStringSettings.cs

Menginisialisasi instans baru kelas ConnectionStringSettings.

public:
 ConnectionStringSettings(System::String ^ name, System::String ^ connectionString, System::String ^ providerName);
public ConnectionStringSettings (string name, string connectionString, string providerName);
new System.Configuration.ConnectionStringSettings : string * string * string -> System.Configuration.ConnectionStringSettings
Public Sub New (name As String, connectionString As String, providerName As String)

Parameter

name
String

Nama grup koneksi.

connectionString
String

String koneksi.

providerName
String

Nama penyedia yang akan digunakan dengan string koneksi.

Contoh

Contoh berikut menunjukkan cara membuat ConnectionStringSettings objek dan menambahkannya ke ConnectionStringSettingsCollection koleksi.

// Add the connection string.
ConnectionStringsSection csSection =
    config.ConnectionStrings;
csSection.ConnectionStrings.Add(
    new ConnectionStringSettings(csName,
        "LocalSqlServer: data source=127.0.0.1;Integrated Security=SSPI;" +
        "Initial Catalog=aspnetdb", "System.Data.SqlClient"));
' Add the connection string.
Dim csSection _
As ConnectionStringsSection = _
config.ConnectionStrings
csSection.ConnectionStrings.Add( _
New ConnectionStringSettings(csName, _
"LocalSqlServer: data source=127.0.0.1;Integrated Security=SSPI;" _
+ "Initial Catalog=aspnetdb", "System.Data.SqlClient"))

Lihat juga

Berlaku untuk