Add element in ArrayList

In this article I will explain that how can we add the element in the ArrayList.
  • 2826

We can add the elements in the ArrayList by using the add() method.

namespace ArrayList1

{

    class Program

    {

        static void Main(string[] args)

        {

            ArrayList ar = new ArrayList();

            ar.Add("Jan");

            ar.Add("Feb");

            ar.Add("March");

            ar.Add("April");

            ar.Add("May");

            ar.Add("June");

            ar.Add("July");

        }

    }

}

Further Readings

Ask Your Question

Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2018 DotNetHeaven. All rights reserved.