class Program
{
public static void Main()
{
ArrayList list = new ArrayList();
list.Add(2);
list.Add(3); // Add two integers in ArrayList
Example(list); // Here Example is a method
}
static void Example(ArrayList list)
{
foreach(int abc in list)
{
Console.Writeline(abc);
Console.ReadLine();
}
}
}
OUTPUT :
2
3
---------------*----------------
{
public static void Main()
{
ArrayList list = new ArrayList();
list.Add(2);
list.Add(3); // Add two integers in ArrayList
Example(list); // Here Example is a method
}
static void Example(ArrayList list)
{
foreach(int abc in list)
{
Console.Writeline(abc);
Console.ReadLine();
}
}
}
OUTPUT :
2
3
---------------*----------------
0 Comments