using System.Collections.Generic;
public string Name { get; set; }
public string Education { get; set; }
public Customer(string n, string e, string m)
List <Customer> CustomerList = new List<Customer>();
CustNew = new Customer("John", "Bachelor", "john@gmail.com");
CustomerList.Add(CustNew);
CustNew = new Customer("David", "Bachelor", "david@iu.edu");
CustomerList.Add(CustNew);
CustNew = new Customer("Anderson", "Master", "anderson@iu.edu");
CustomerList.Add(CustNew);
CustNew = new Customer("Mary", "Master", "maryiu.edu");
CustomerList.Add(CustNew);
Console.WriteLine("Show All 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 list");
foreach (Customer c in CustomerList)
Console.WriteLine(c.EmailLength());
Console.WriteLine("=============================================");
Console.WriteLine("Show Only Bachelor");
foreach (Customer c in CustomerList)
if (c.Education == "Bachelor")
Console.WriteLine(c.Name.PadRight(15) + c.Education.PadRight(15) + c.Email.PadRight(15));