现在的位置: 首页 > 综合 > 正文

错误 2 无法将类型“int”隐式转换为“bool”

2014年01月11日 ⁄ 综合 ⁄ 共 227字 ⁄ 字号 评论关闭

  

为什么出错呢

      DateTime year = new DateTime(2004, 12, 22, 13, 23, 16);
        DateTime youyear = year.AddYears(28);

        if (youyear.CompareTo(DateTime.Now) = 0)
        {
            Response.Write("目前他还没有到28岁");
        }


 

错误 2 无法将类型“int”隐式转换为“bool”

抱歉!评论已关闭.