Now Place:2uzhan.com » System.collections question

System.collections question

C-Sharp Programming @ March 4, 2009   Views:0

HI there,
Is there any way i can create a multidimensional array at runtime? my arraylist need to hold object, string , string string and i need to databind this to my asp page.

I saw couple of threads where arraylist of arraylist is suggested, is there any other way?




Don't use ArrayLIst, it is old and has been replaced by strongly typed generic collections. If you want multi-dimensional dynamic arrays, then Lists of Lists would be the way to go.

THanks for your reply. I was thinking system.collectios.Arraylist...i beleive it is different to arraylist isn't it?
Anyway, will try List.

No, System.Collections.ArrayList is a list of objects. In .NET 2.0, generics were introduced. The generic containers are all type safe, i.e., no casting required.

© 2018 2uzhan.com Contact