Set an empty DateTime variable

前端 未结 12 2082
走了就别回头了
走了就别回头了 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:25

    There's no such thing as an empty date per se, do you mean something like:

    DateTime? myDateTime = null;
    

提交回复
热议问题