ConfigurationSettings.GetConfig(String) Metoda

Definicja

Przestroga

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

Przestroga

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

ConfigurationSection Zwraca obiekt dla przekazanej nazwy i ścieżki sekcji konfiguracji.

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

Parametry

sectionName
String

Nazwa konfiguracji i ścieżka, taka jak "system.net/settings".

Zwraca

ConfigurationSection Obiekt dla przekazanej nazwy i ścieżki sekcji konfiguracji.

Atrybuty

Wyjątki

Nie można pobrać żądanej sekcji.

Uwagi

Ta metoda jest przestarzała i jest utrzymywana w celu zapewnienia zgodności z poprzednimi wersjami. Zamiast tego użyj ConfigurationManager.GetSection(String) metody .

Dotyczy

Zobacz też