C# problems with for loop : <p>can someone tell me why this doesn't work. I want to display randomly ten chemical elements, but it always displays the same elements. Thanks for help!</p>

<pre><code>        var random = new Random();
        var list = new List&lt;string&gt; { "Hg" , "B", "H", "Mg" };
        int index = random.Next(list.Count);
        for (int i = 0; i &lt; 10; i++) {
            Console.WriteLine(list[index]);
        }
</code></pre>
