c# - Create a List to sort through -
i couldn't find on subject translated current issue hoping ideas on how solve following:
i have 2 lists each hold following information lot of values:
list 1:
int row string text
list 2:
int column string text
what want consolidate 2 lists 1 - don't know object use, though. closest know of .csv has header information "row","column" , "text". don't want write .csv , have load program work further - want object/array. exist?
after need able sort values, sort "row" first, "column". final product can this:
row column text 0 0 test1 0 1 test2 1 0 test3 ...
your appreciated (yes i'm beginner in c#).
list<myclass> list1 = new list<myclass>(); list<myclass> list2 = new list<myclass>();
please note myclass class storing data.
// merge 2 list list1.addrange(list2);
and sorting, can
list<myclass> sortedlist = list1.orderby(x => x.row).thenby(x => x.column).tolist();