Share via


ConfigurationSettings.GetConfig(String) Méthode

Définition

Attention

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

Attention

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

Retourne l'objet ConfigurationSection pour le nom et le chemin d'accès de section de configuration passés.

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

Paramètres

sectionName
String

Nom et chemin d'accès de configuration, par exemple "system.net/settings".

Retours

Objet ConfigurationSection pour le nom et le chemin d'accès de section de configuration passés.

Attributs

Exceptions

Impossible de récupérer la section demandée.

Remarques

Cette méthode est obsolète et est conservée à des fins de compatibilité descendante. Utilisez la méthode à la ConfigurationManager.GetSection(String) place.

S’applique à

Voir aussi