How can i construct a variable name in code from a string?
<p>I have a number of variables named test1....test10 they are all declared as a string.</p>

<p>what I want to do is access them from inside a loop using the loop counter something like this:</p>

<pre><code>string test1;
//...
string test10;

for (int i = 1; i &lt; 10; i++)
{
    test + i.ToString() = "some text";  
} 
</code></pre>

<p>any idea how I could do this? 
this is a WPF .net 4 windows App.</p>
