akwwl

  直接上代码:

     /// <summary>
        /// 判断是否闰年?
        /// </summary>
        /// <param name="a_year"></param>
        /// <returns></returns>
        public static bool IsLeapYear(int a_year)
        {
            String s;
            DateTime dt;
            try
            {
                s = (a_year.ToString() + "-02-29");
                dt = Convert.ToDateTime(s);
                return true;
            }
            catch
            {
                return false;
            }
        }

 

分类:

技术点:

相关文章:

  • 2021-10-01
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
猜你喜欢
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
相关资源
相似解决方案