Put user-defined objects to Queue collection
using System; using System.Collections; public class Starter { public static void Main() { Queue waiting = new Queue(); waiting.Enqueue(new Customer("B")); waiting.Enqueue(new Customer("T")); waiting.Enqueue(new Customer("K")); waiting.Enqueue(new Customer("S")); while (waiting.Count != 0) { Customer cust = (Customer)waiting.Dequeue(); Console.WriteLine(cust.Name); } } public class Customer { public Customer(string cName) { propName = cName; } private string propName; public string Name { get { return propName; } } } }