2
Answers

Sorting ascending of anonymous list created from ToArray()?

Mike Edds

Mike Edds

10y
809
1
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)