ConfigurationSettings.GetConfig(String) 方法

定义

注意

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

注意

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

返回传递的配置节名称和路径的 ConfigurationSection 对象。

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

参数

sectionName
String

一个配置名称和路径,如“system.net/settings”。

返回

传递的配置节名称和路径的 ConfigurationSection 对象。

属性

例外

无法检索请求的节。

注解

此方法已过时,为了向后兼容,会保留此方法。 请改用 ConfigurationManager.GetSection(String) 方法。

适用于

另请参阅