I have 2 lists, what are pairs:
List<int> timeStamp = new List<int>();
List<string> ownerStamp = new List<string>();
For example:
timeStamp’ elements: 1, 10, 32 …
ownerStamp’ elements: John, Dave, Maria …
The pairs are: John-1; Dave-10; Maria-32…
I have to order the timestamp list’s elements, but i have to hold the context! How can i do it? Manually? Or smthng smart with factory ordering?
There is an overload of Array.Sort() method, which allow you sort one array using other array items as keys. You can convert your lists to arrays, then sort them, and then convert back: