title: Return List With Multiple Elements
body: <p>I'm struggling getting my head around returning a List that has multiple elements (PHP background - I'd use arrays for this in PHP).</p>
  
  <p>I have a large string that I'm parsing in a WHILE loop. I want to return a List with pairs of elements. I've tried something like this:</p>
  
  <pre><code>static public List&lt;string&gt; getdata(string bigfile)
  {
  var data = new List&lt;string&gt;[] { new List&lt;string&gt;(), new List&lt;string&gt;() };  // create list to hold data pairs
  
  While (some stuff)
  {
     // add element pair to List&lt;data&gt;
     data[0].Add(this);  // add element to list - 'this' is declared and assigned (not shown)    
     data[1].Add(that);  // add element to list - 'that' is declared and assigned (not shown)
  
  }
  
  return data???;  // &lt;&lt;-- This is where I'm failing. I can, of course, return just one of the elements, like return data[0];, but I can't seem to get both elements (data[0] and data[1]) together.
  
  }  // end getdata
  </code></pre>
  
  <p>I've reviewed some answers, but I'm missing something. I've tried several things syntactically for the return value, but no luck. Any help would be greatly appreciated. I hate asking questions, but I've spent some time on this and I'm just not finding what I want.</p>