ConfigurationSettings.GetConfig(String) Metoda

Definice

Upozornění

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

Upozornění

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

ConfigurationSection Vrátí objekt pro předaný název a cestu oddílu konfigurace.

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

Parametry

sectionName
String

Název a cesta konfigurace, například "system.net/settings".

Návraty

Objekt ConfigurationSection pro předaný název a cestu oddílu konfigurace.

Atributy

Výjimky

Požadovaný oddíl nelze načíst.

Poznámky

Tato metoda je zastaralá a udržuje se kvůli zpětné kompatibilitě. Místo toho použijte metodu ConfigurationManager.GetSection(String) .

Platí pro

Viz také