I have an asp.net application where I have 4 List collection objects
List<string> sTransID = new List<string>();
List<string> sOriginID = new List<string>();
List<string> sDestID = new List<string>();
List<string> sCourierID = new List<string>();
These objects are populated at different sections of the application (inside a class, or an aspx code behind etc). The page performance is significantly slow when List elements size increase.
What would be the fastest way to loop through these objects when reading their values (in order to avoid having to loop through 4 objects) ? Can I merge these objects into a parent List object and loop through the parent?
Update:
By merge, I mean something like:
var Parent = List<sTransID>, List<sOriginID>, List<sDestID>, List<sCourierID>
var GetLocation = Parent[0]; // will return TransID[0], Origin[0], DestID[0], CourierID[0]