class Program
{
static void Main(string[] args)
{
List<int> li = new List<int>();
li.Add(1);
li.Add(2);
li.Add(3);
foreach (int i in li)
{
Console.WriteLine(i);
}
Dictionary<int,string> di = new Dictionary<int,string>();
di.Add(1,"kul");
di.Add(2, "raj");
di.Add(3, "neha");
foreach(KeyValuePair<int,string> ob in di)
{
Console.WriteLine(ob.Key +" "+ob.Value);
}
HashSet<int> ht = new HashSet<int>();
ht.Add(1);
ht.Add(2);
ht.Add(3);
foreach (int i in ht)
{
Console.WriteLine(i);
}
ArrayList obj = new ArrayList();
obj.Add(1);
obj.Add("kul");
obj.Add("noida");
foreach (object i in obj)
{
Console.WriteLine(i);
}
Console.ReadLine();
}
}
{
static void Main(string[] args)
{
List<int> li = new List<int>();
li.Add(1);
li.Add(2);
li.Add(3);
foreach (int i in li)
{
Console.WriteLine(i);
}
Dictionary<int,string> di = new Dictionary<int,string>();
di.Add(1,"kul");
di.Add(2, "raj");
di.Add(3, "neha");
foreach(KeyValuePair<int,string> ob in di)
{
Console.WriteLine(ob.Key +" "+ob.Value);
}
HashSet<int> ht = new HashSet<int>();
ht.Add(1);
ht.Add(2);
ht.Add(3);
foreach (int i in ht)
{
Console.WriteLine(i);
}
ArrayList obj = new ArrayList();
obj.Add(1);
obj.Add("kul");
obj.Add("noida");
foreach (object i in obj)
{
Console.WriteLine(i);
}
Console.ReadLine();
}
}