office politics
It's all just 1s and 0s
- Messages
- 6,555
- Location
- in the lab
i'm getting index out of bounds when trying to assign ok the the a array.
Code:
static void Main(string[] args)
{
string[] a = new string[0];
Console.WriteLine(a.GetUpperBound(0) + 1);
Array.Resize(ref a, a.GetUpperBound(0) + 1);
a[0] = "ok";
Console.WriteLine(a[0]);
}