how do I use a for statement to change the name in an already array variable?
<p>I have 4 .txt documents in a folder, each document with 10 lines of information. I want to save each line from each file in an array. I am looking for a solution that will give me:</p>

<pre><code>//four arrays with 10 variables each

vFile_0[0-9]
vFile_1[0-9]
vFile_2[0-9]
vFile_3[0-9]
</code></pre>

<p>I could potentially accomplish this by naming each variable based on <strong>i</strong> within the loop:</p>

<pre><code>for (int i = 0; i &lt; vCount; i++)
{
    string[] vFileLine_ + i = File.ReadAllLines("document_" + i + ".txt" );
}
</code></pre>

<p>This doesn't work, Does anyone know what I am to replace the <strong>i</strong> with?</p>

<hr>

<p><strong>EDIT:</strong>  I am going into further detail. I want to organize Any Number of .txt documents in a folder, that have random amounts of lines inside them.</p>

<p>Example:</p>

<pre><code>Document 1 has 6 lines of information.
Document 2 has 3 lines of information.
Document 3 has 12 lines of information.
Document 4 has 5 lines of information.
</code></pre>

<p>I wish to store all that info into arrays, and when done correctly, the variable names will be shown like so:</p>

<pre><code>vFile_0 [5]
vFile_1 [2]
vFile_2 [11]
vFile_3 [4]
</code></pre>

<p>As you can see above, each document has a respective variable name with an array amount equal to the lines in that document, each variable in those arrays stores the line of info from that document as a string. The purpose of this type of variable storage is that I could one day run the program and detect 4 files that have 10 lines each, or 120,000 files with 30,000 lines each.</p>

<p>The only issue I am having right now, is naming the variables that way.</p>