JHSections.Get(Ttype) Method (String, String)

DCSoft.DBUtilityGeneric

JHSectionsGetTtype Method (String, String)
检索当前应用程序默认配置的指定配置节,返回配置节中项对应键的值 该配置节下节点必须可转换为 System.Collections.Specialized.NameValueCollection 异常或获取为 null 则返回 default(Ttype)

Namespace: DCSoft.Utility.Configuration
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static Ttype Get<Ttype>(
	string sectionName,
	string key
)
where Ttype : IConvertible

Parameters

sectionName
Type: SystemString
配置节的路径和名称
key
Type: SystemString
配置节中项的键

Type Parameters

Ttype
要返回的数据类型,如 int, string, DateTime 等

Return Value

Type: Ttype
返回键对应的值
See Also