Arraylist

C

cmdolcet69

I ahve created an arraylist to hold 1276 value if i only can fill 1270
how can i delete the rest of the empty arraylist locations?
 
R

rowe_newsgroups

I ahve created an arraylist to hold 1276 value if i only can fill 1270
how can i delete the rest of the empty arraylist locations?

I have no idea what you are trying to tell us. Could you please repeat
your question a bit clearer?

If possibly you should even include a short code sample that
reproduces the problem.

Thanks,

Seth Rowe [MVP]
http://sethrowe.blogspot.com/
 
K

Kerry Moorman

cmdolcet69,

You can call the arraylist's TrimToSize method or you can set its Capacity
property directly.

You might consider using a List instead of an ArrayList.

Kerry Moorman
 
C

cmdolcet69

I have no idea what you are trying to tell us. Could you please repeat
your question a bit clearer?

If possibly you should even include a short code sample that
reproduces the problem.

Thanks,

Seth Rowe [MVP]http://sethrowe.blogspot.com/

I have set an arraylist with 1276 slots to fill, what i noticed is
that i don't need to fill all 1276 slots I only need maybe 1270 slots.
How can i re initialize the arraylist to only have 1270 slots after I
fill them and delete the 6 slots that are empty.


I hope this is clear, sorry for any confusion
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top