Adding elements to an array in C#
<p>I am a newbie to programming c# and I want to add an element to an array.</p>

<p>Here's my function:</p>

<pre><code>public bool AddPlayer(string PlayerName,string token)
{
    static int i = 0;  // &lt;---- Error

    if ( PlayerIndex &lt; MAX_NUMBER_OF_PLAYERS )
    {          
        Player[i]= PlayerName
        i++;
    }

    return true;
} 
</code></pre>

<p>The static int i = 0 results in an error.  Is there another way to do this?</p>
