i’m new to asp.net and i’m writing some code to learn about arraylist
al.Add((string)"asfsaf");
al[1] = "bcd";
al.TrimToSize();
Response.Write(al[1]);
from the above code, the line al[1] = “bcd”; is wrong, is arraylist support insert elements by index? if not, any other data structure can be replaced?
thanks
You can try .Insert() as below: