Can someone tell me how i can insert a string value into an array of type string.
This is the code i have.
for(int i = 0; i < .....;i++)
val1 = "Hello";
listPoints[ i ] = val1; //had to put spacing in the [ i ] as they shows up as a light bulb
Im getting an error with using this kind of insert into the array?
Anyone tell me why?
Depending on your needs, you may also use Generic List<string>, which will allow you to add, change or remove items without having to fix it size at declaration. When needed, you can use its ToArray() method to return plain string array, containing string items.