using System;
using System.Collections;
//csc arraylist_Enqueue.cs
namespace ex_arraylist
{
public class alist
{
ArrayList al = new ArrayList();
public string sta1 = "";
public string sta2 = "";
public string sta3 = "";
public string sta4 = "";
public void procss()
{
Console.WriteLine("--Existing Players - " );
// Creates and initializes a new Queue.
Queue myQ = new Queue();
myQ.Enqueue( "Baba" );
myQ.Enqueue( "Lugo" );
myQ.Enqueue( "Patrick" );
myQ.Enqueue( "Jacob" );
//display through read
read(myQ, '\t');

//load players name to added
Console.WriteLine("--data - New Players added - " );
Console.Write("Player's Name 1: " );
sta1 = Console.ReadLine();
al.Add(sta1);
Console.Write("Player's Name 2: " );
sta2 = Console.ReadLine();
al.Add(sta2);
Console.Write("Player's Name 3: " );
sta3 = Console.ReadLine();
al.Add(sta3);
Console.Write("Player's Name 4: " );
sta4 = Console.ReadLine();
al.Add(sta4);
Console.WriteLine("All Counts :" + al.Count);
/// added ques
// Creates and initializes a new Queue.
Console.WriteLine("----------");
Console.WriteLine("Enqueued or added to the list ");
al.AddRange(myQ);
read(al, '\t');

/// </summary>
/// <param name="em"></param>
//read(al);
} //end of method
public void read(IEnumerable em, char sep)
{
foreach ( Object obj in em )
Console.Write( "{0}{1}", obj,sep );
Console.WriteLine();
}
}
//end of arrylist class
class test
{

static void Main(string[] str)
{Console.Write("Enter a word a evry steps :");
alist at = new alist();
at.procss();
Console.ReadLine();
}//end of the class list
}
}//end of namespace