I have inserted the EventData EntityList into a normal List and now I want to reverse it. But it gives the error "Cannot implicitly convert type 'void' to 'object'"
List<Entities.Notification> ProgramList = EventData.ToList();
ListViewEvents.DataSource = ProgramList.Reverse();
ListViewEvents.DataBind();
How do I reverse this list? Is it possible to directly reverse the EntityList as well?
Reverse does the reversal in place and does not return anything. Instead do:
List<Entities.Notification> ProgramList = EventData.ToList();
ProgramList.Reverse();
ListViewEvents.DataSource = ProgramList;
ListViewEvents.DataBind();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With