运行时的DateTime intizialitaion错误 [英] DateTime intizialitaion error on runtime
本文介绍了运行时的DateTime intizialitaion错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行程序时,我遇到日期时间错误而没有获得值的问题。我确实设置了这样的控制值
I get problem with error of datetime not getting value when i run program. I do set value at control like this
public ActionResult CálculoData(DateTime DataInic = default(DateTime))
{
但错误消息告诉我
'/'应用程序中的服务器错误。
遇到默认值的无效类型。
but erro message tell me
Server Error in '/' Application.
Encountered an invalid type for a default value.
推荐答案
我想你可能和我在其他地方看到的问题一样。
显然这是一个bug他们报告了运行时只有错误的地方。
试试这个
I think you might have the same problem as what i saw somewhere else.
Apparently this is a bug that they have reported where there is only an error at run time.
Try this
public ActionResult CálculoData(DateTime? DataInic = DateTime.Now)
{
这篇关于运行时的DateTime intizialitaion错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文