using System.Collections.Generic;
public string Name {get; set;}
public string Education {get; set;}
public Customer (string strName, string strEducation, string strEmail)
Education = strEducation;
public int EmailLength ()
public List <Customer> custList = new List<Customer>();
Customer customer = new Customer();
customer = new Customer ("John", "Bachelor", "john@gmail.com");
customer = new Customer ("David", "Bachelor", "david@iu.edu");
customer = new Customer ("Anderson", "Master", "anderson@iu.edu");
customer = new Customer ("Mary", "Master", "maryiu.edu");
Console.WriteLine("Show All List");
foreach (Customer c in custList)
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 custList)
Console.WriteLine(c.EmailLength());
Console.WriteLine("=============================================");
Console.WriteLine("Show Only Bachelor");
foreach (Customer c in custList)
if (c.Education == "Bachelor")
Console.WriteLine(c.Name.PadRight(15) + c.Education.PadRight(15) + c._Email.PadRight(15));