How do you initialize a 1 dimensional array when you do not know the size in C#?
<p>I had been trying really hard about initializing a 1 dimensional array without knowing its size, but dont get it;
Please tell me how can I declare a array whose size will dynamically increase as per the requirement in C#. </p>

<p>I mean, want to do something like this</p>

<pre><code>class A
{
    int[] myarray;
    int i=0;
    while(i&lt;5)
    {
        myarray[i]==n;
        n=n%10;
        i++;
    }
}
</code></pre>

<p>Please Help !!!</p>
