Click here to Skip to main content
14,638,971 members
Rate this:
Please Sign up or sign in to vote.
See more:
How to create dynamic array with unlimited size?
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't. You would use the List class for that, so that it can resize itself as needed. There's no such thing as 'unlimited size'.
   
Comments
Aswathi Narayan 6-Jul-11 5:08am
   
ok ..thank u
Rate this:
Please Sign up or sign in to vote.

Solution 2

i found the solution.

create array list.

ArrayList obj = new ArrayList();
//adding item
obj.Add("name");
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Consider IList<t> which is generic and maintain its size by it self. I think this will do the job. Please see below details about IList<t>[^]

:)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100