I am a php programmer. Unlucky that I have to face some Aspx problem.
I have two dataSource list Objects:
List < Event > eventSource=eventSource.ToList();
List < News > newsSource=newData.ToList();
Although event and News had the same fields(id, title, description, last_updated), they are stored in the different tables (news and event), and there is no relationship between two tables. Both of them had last_updated field which contain a datetime. I need to join them into one table and sort them by last_updated desc.
Then I write something funny with my java(?) knowledge:
List < Object > resultSource=new List < Object >();
foreach (Event eventInfo in eventSource){
resultSource.Add(eventInfo);
}
I have loop the newsSource and add them in the resultSource. Then I try to use this to sort by datetime:
resultSource=resultSource.OrderBy(???).ToList();
But I don't know what parameter should be filled in that ??? area, and I found that I cannot get the "resultInfo.title" in the foreach loop, because I don't have "title" field in the Object class.
Do I have anyway to solve this in simple way?