B
Brett
I need an array but don't know how many items will go into it upon
declaration.
int ArrayIndex = 0;
string[] linkArray = new string[]{};
for (int i = 0; i < Links.Count; i++)
{
linkArray[ArrayIndex] = u.AbsoluteUri;
ArrayIndex++;
}
The first time through the loop, I get an out of bounds error. How exactly
does the array need to work in this case?
Thanks,
Brett
declaration.
int ArrayIndex = 0;
string[] linkArray = new string[]{};
for (int i = 0; i < Links.Count; i++)
{
linkArray[ArrayIndex] = u.AbsoluteUri;
ArrayIndex++;
}
The first time through the loop, I get an out of bounds error. How exactly
does the array need to work in this case?
Thanks,
Brett