ConfigurationSettings.GetConfig(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
ConfigurationSettings.GetConfig has been deprecated. Use System.Configuration.ConfigurationManager.GetSection instead.
注意
This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.GetSection
返回 ConfigurationSection 传递的配置节名称和路径的对象。
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
参数
- sectionName
- String
配置名称和路径,例如“system.net/settings”。
返回
ConfigurationSection传递的配置节名称和路径的对象。
- 特性
例外
无法检索请求的节。
注解
此方法已过时,维护以实现向后兼容性。 请改用该方法 ConfigurationManager.GetSection(String) 。