C#中两个日期类型相减得到天数 protected int GetDuration(DateTime start, DateTime finish) { return (finish - start).Days; } 直接相减得到的是时间间隔是TimeSpan