2012-12-12 90 views

回答

1

使用Max方法。

DateTime[] arr = new DateTime[] 
    { DateTime.Today, DateTime.Today.AddDays(1), DateTime.Today.AddDays(2) }; 
DateTime lastEntity = arr.Max(x => x.Date); // equals DateTime.Today.AddDays(2) 
相關問題