コード例 #1
0
 /// <summary>
 /// 得到DateTime
 /// </summary>
 /// <param name="data"></param>
 /// <param name="key"></param>
 /// <returns></returns>
 public static DateTime GetDateTime(this IDictionary data, string key)
 {
     DateTime result = default(DateTime);
     if (data != null)
         if (data.Contains(key)) result = UcUtility.PhpTimeToDateTime(long.Parse(data[key].ToString()));
     return result;
 }
コード例 #2
0
        /// <summary>
        /// 得到DateTime
        /// </summary>
        /// <param name="data"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        static public DateTime GetDateTime(this IDictionary data, string key)
        {
            var result = default(DateTime);

            if (data != null)
            {
                if (data.Contains(key))
                {
                    result = UcUtility.PhpTimeToDateTime(long.Parse(data[key].ToString()));
                }
            }
            return(result);
        }