A ArrayList object is a collection of data items that contain a single data value.
--------------------------------------------------------------------------------
Create ArrayList
A ArrayList object is a collection of data items that contain a single data value.
The data item is added to the ArrayList using the Add () method.
The following code creates a new ArrayList object, named Mycountries, and adds 4 data items:
<script runat= "Server" >
Sub Page_Load
if not Page.IsPostBack then
Dim mycountries=new ArrayList
mycountries. ADD ("Norway")
mycountries. ADD ("Sweden")
mycountries. ADD ("France")
mycountries. ADD ("Italy") end
if End
sub
</script>
By default, a ArrayList object contains 16 records. You can use the TrimToSize () method to qualify ArrayList for its final actual size:
<script runat= "Server" >
Sub Page_Load
if not Page.IsPostBack then
Dim mycountries=new arraylist< c15/> mycountries. ADD ("Norway")
mycountries. ADD ("Sweden")
mycountries. ADD ("France")
mycountries. ADD ("Italy")
mycountries. TrimToSize () End
if End
sub
</script>