using System.Collections.Generic;
public string Name { get; set; }
public string Education { get; set;}
public string Email { get; set;}
public Customer (string n, string edu, string e)
public static List<Customer> CustomerList = new List<Customer>();
public static void Main()
customer = new Customer("John","Bachelor", "john@gmail.com");
CustomerList.Add(customer);
customer = new Customer("David","Bachelor","david@iu.edu");
CustomerList.Add(customer);
customer = new Customer("Anderson","Master","anderson@iu.edu");
CustomerList.Add(customer);
Console.WriteLine("Show List");
foreach (Customer c in CustomerList)
Console.WriteLine(c.Name.PadRight(15) + c.Education.PadRight(15) + c.Email.PadRight(15));
Console.WriteLine("=============================================");
Console.WriteLine("Show Email Length for all the elements of the list");
foreach (Customer c in CustomerList)
Console.WriteLine(c.EmailLength());
Console.WriteLine("=============================================");
Console.WriteLine("Show Only Bachelor Entries");
foreach (Customer c in CustomerList)
if (c.Education == "Bachelor")
Console.WriteLine(c.Name.PadRight(15) + c.Education.PadRight(15) + c.Email.PadRight(15));