Set an empty DateTime variable

前端 未结 12 2101
走了就别回头了
走了就别回头了 2020-12-16 08:59

I would declare an empty String variable like this:

    string myString = string.Empty;

Is there an equivalent for a \'DateTime\' variable

12条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 09:45

    If you set the date to

    DateTime dNewDate = new DateTime();
    

    The value is set to {1/1/0001 12:00:00 AM}

提交回复
热议问题