ConfigurationSettings.GetConfig(String) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Varning
ConfigurationSettings.GetConfig has been deprecated. Use System.Configuration.ConfigurationManager.GetSection instead.
Varning
This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection
Returnerar objektet ConfigurationSection för det angivna konfigurationsavsnittets namn och sökväg.
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
Parametrar
- sectionName
- String
Ett konfigurationsnamn och en sökväg, till exempel "system.net/settings".
Returer
Objektet ConfigurationSection för det angivna konfigurationsavsnittets namn och sökväg.
- Attribut
Undantag
Det gick inte att hämta det begärda avsnittet.
Kommentarer
Den här metoden är föråldrad och underhålls för bakåtkompatibilitet. Använd ConfigurationManager.GetSection(String) metoden i stället.