JHAppSettings.Get(Ttype) Method (String)

DCSoft.DBUtilityGeneric

JHAppSettingsGetTtype Method (String)
获取 AppSettings 中的指定键关联的值,异常或获取值为 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 name
)
where Ttype : IConvertible

Parameters

name
Type: SystemString
appSettings 中配置的键的 name 值

Type Parameters

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

Return Value

Type: Ttype
返回获取的配置信息的 value 的值
See Also