类库说明文档
![]() | JHCookieGetTtype Method (String, Ttype) |
获取 Cookie 中指定键的值,已去除首尾空格并解码
Namespace: DCSoft.Utility.Web
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)

C#
public static Ttype Get<Ttype>( string name, Ttype defaultValue ) where Ttype : IConvertible
Parameters
- name
- Type: SystemString
要获取的键名称 - defaultValue
- Type: Ttype
如果获取值为 null,或者转换异常则返回默认值
Type Parameters
- Ttype
- 要返回的数据类型,如 int, string, DateTime 等
Return Value
Type: Ttype返回指定键的值
