Introduced in dotnet framework 1.1. This ArrayList class is implementing the IList interface, using this array size can increase dynamically.
Example:
Rajesh
Kumar
Please give your valuable articals on this topic. We will post by the name of you, if you like. Please submit your articles in the comments.
Example:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace sortedlist
{
class Program
{
static void Main(string[] args)
{
ArrayList objArrayList = new ArrayList();
objArrayList.Add("Ranga");
objArrayList.Add("Rajesh");
objArrayList.Add("Kumar");
SortedListKeysAndValues(objArrayList);
Console.ReadLine();
}
public static void SortedListKeysAndValues(ArrayList arrayList)
{
for (int i = 0; i < arrayList.Count; i++)
{
Console.WriteLine(arrayList[i]);
}
Console.WriteLine();
}
}
}
Output:
RangaRajesh
Kumar
Please give your valuable articals on this topic. We will post by the name of you, if you like. Please submit your articles in the comments.
Post a Comment
Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.