R
raagzcd
Hi,
In the following sample code.
ArrayList arrlist = new ArrayList(3);
int count = arrlist.Count;
int cpty = arrlist.Capacity;
arrlist.TrimToSize();
int newctpy = arrlist.Capacity;
cpty value is : 3
newctpy value is : 4
why is the new capacty value after TrimToSize() on the arraylist is 4 ?
even if arraylist size is changed to 2 newctyp value still remains as 4
!
Can anybody explain me more about this ?
Regards
Raagz
In the following sample code.
ArrayList arrlist = new ArrayList(3);
int count = arrlist.Count;
int cpty = arrlist.Capacity;
arrlist.TrimToSize();
int newctpy = arrlist.Capacity;
cpty value is : 3
newctpy value is : 4
why is the new capacty value after TrimToSize() on the arraylist is 4 ?
even if arraylist size is changed to 2 newctyp value still remains as 4
!
Can anybody explain me more about this ?
Regards
Raagz