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#.
I mean, want to do something like this
class A
{
int[] myarray;
int i=0;
while(i<5)
{
myarray[i]==n;
n=n%10;
i++;
}
}
Please Help !!!
User can also declare this type of array using ARRAYLIST
System.Collections namespace defines a class known as ArrayList that can store dynamic sized array of objects.