Mike Edds

Mike Edds

  • NA
  • 1
  • 1.1k

Sorting ascending of anonymous list created from ToArray()?

Jul 9 2014 2:10 PM
var datesList = (from w in Conferences
 
where w.Status == Completed

&& w.EndDate.HasValue

&& w.EndDate <= Deadline

&& w.EndDate > MinimumDate

orderby w.EndDate ascending

select w.EndDate)

.Concat(from c in Tranings

where c.Status == Completed

&& c.EndDate.HasValue

&& c.EndDate <= Deadline

&& c.EndDate > MinimumDate

orderby c.EndDate ascending

select c.EndDate)

.Concat(from t in Certifications

where t.TakingDate <= Deadline

&& t.TrackingDate > MinimumDate

orderby t.TakingDate ascending

select t.TrackingDate as DateTime?);

var arrayDateList = datesList as DateTime?[] ?? datesList.ToArray();

I need to do ascending sort of arrayDateList. 

Thanks in advance!!


Answers (2)