Can anyone advice on what to choose in this situation: I have 100-500(they dynamic, means on every request their number always diffrent) elements which contains element name, type, id. Currently I using multidimensional array
public static Object[,] Item_data = new Object[500, 3];
And then I set data to array:
int found_items = 0;
foreach (Object m in queryCollection)
{
Item_data[found_items, 0] = m[0];
Item_data[found_items, 1] = m[1];
Item_data[found_items, 2] = m[0];
found_plans++;
}
And I have 8 other same structure arrays which fills different data, it cost around 0.8-1.5 seconds, problem is I need to sort these arrays ASC, DESC by id, by name and by type, if i do manually using another loop to sort data it cost time, so I noticed about List(T) it has sort feature, but its much slower according to these topics:
Performance of Arrays vs. Lists
https://jacksondunstan.com/articles/3058
https://softwareengineering.stackexchange.com/questions/221892/should-i-use-a-list-or-an-array
Is it worth to use List(T) in this situation? Or can anyone recommend something else?