new DateTime() vs default(DateTime)
问题 Is there a reason to choose one of these over the other? DateTime myDate = new DateTime(); or DateTime myDate = default(DateTime); Both of them are equal 1/1/0001 12:00:00 AM . 回答1: No, they are identical. default() , for any value type ( DateTime is a value type) will always call the parameterless constructor. 回答2: If you want to use default value for a DateTime parameter in a method, you can only use default(DateTime). The following line will not compile: private void MyMethod(DateTime