title: C# array or List(T) for max performance
body: <p>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</p>
  
  <pre><code>public static Object[,] Item_data = new Object[500, 3];
  </code></pre>
  
  <p>And then I set data to array:</p>
  
  <pre><code>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++;
          }
  </code></pre>
  
  <p>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:</p>
  
  <p><a href="https://stackoverflow.com/questions/454916/performance-of-arrays-vs-lists">Performance of Arrays vs. Lists</a></p>
  
  <p><a href="https://jacksondunstan.com/articles/3058" rel="nofollow noreferrer">https://jacksondunstan.com/articles/3058</a></p>
  
  <p><a href="https://softwareengineering.stackexchange.com/questions/221892/should-i-use-a-list-or-an-array">https://softwareengineering.stackexchange.com/questions/221892/should-i-use-a-list-or-an-array</a></p>
  
  <p>Is it worth to use List(T) in this situation? Or can anyone recommend something else?</p>