Bagikan melalui


ConfigurationSettings.GetConfig(String) Metode

Definisi

Perhatian

This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection

Perhatian

ConfigurationSettings.GetConfig has been deprecated. Use System.Configuration.ConfigurationManager.GetSection instead.

Mengembalikan ConfigurationSection objek untuk nama dan jalur bagian konfigurasi yang diteruskan.

public:
 static System::Object ^ GetConfig(System::String ^ sectionName);
[System.Obsolete("This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection")]
public static object GetConfig (string sectionName);
[System.Obsolete("ConfigurationSettings.GetConfig has been deprecated. Use System.Configuration.ConfigurationManager.GetSection instead.")]
public static object GetConfig (string sectionName);
public static object GetConfig (string sectionName);
[<System.Obsolete("This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection")>]
static member GetConfig : string -> obj
[<System.Obsolete("ConfigurationSettings.GetConfig has been deprecated. Use System.Configuration.ConfigurationManager.GetSection instead.")>]
static member GetConfig : string -> obj
static member GetConfig : string -> obj
Public Shared Function GetConfig (sectionName As String) As Object

Parameter

sectionName
String

Nama dan jalur konfigurasi, seperti "system.net/settings".

Mengembalikan

Objek ConfigurationSection untuk nama dan jalur bagian konfigurasi yang diteruskan.

Atribut

Pengecualian

Tidak dapat mengambil bagian yang diminta.

Keterangan

Metode ini usang dan dipertahankan untuk kompatibilitas mundur. Silakan gunakan metode sebagai gantinya ConfigurationManager.GetSection(String) .

Berlaku untuk

Lihat juga