You must Sign In to post a response.
  • Category: .NET

    Arraylist in

    hi expects

    how to insert the value in arraylist and how to read the value in arraylist

    thnaks for sharing
  • #377411

    If you are a bigenner in array list, go through this site

  • #377414
    please visit below link

    Nisar Ahmad
    DotNetSpider MVM, Badge of Appreciation Award – 2010
    Greatness Can't be achieved by doing big things, If you really want to be great, Do small things in Great way.

  • #377421

    inserting an element in to array list:
    ArrayList testlist = new ArrayList();

    retrieving values from arraylist:
    for (int i=0;i < Testlist.Count - 1;i++)
    Response.Write(Testlist(i).ToString() + "<br>")

    Hope it may helps u......

  • #377422
    code for creation and insertion
    ArrayList myList = new ArrayList();
    myList.Add ("hima"); // Add a string.
    myList.Add(1032); // Add an integer
    myList.Add( DateTime.Now ); // Add current time.
    myList.Add( new DataTable() ); // Add a datatable

  • #377444
    ArrayList is a class in System.Collections namespace
    it can store any kind of object, forexample there is no restriction on the kind of objects that an arraylist can store. One can achieve the functionality of arraylist containing one type of objects such as arraylist containing strings only, or intergers only or some other kind by using the concept of generics.

    happy programming

  • #377453
    many ways to insert or bind the values into Arraylist:

    like Arraylist.add() //indivudal data.
    arrayList.AddRange() //Collection of records can Add
    arrayList.Insert() //insert indivudal data.
    arrayList.InsertRange()//insert at specific data..

    like this many ways we can manipulate arraylist easily...

    i hope the above things will help you a bit.

    Love coding

  • #377516
    hi thnks for reply


    ArrayList alist = new ArrayList();
    for (int i = 0; i < alist.Count; i++)

    Ranganathan Palanisamy

This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.