using System.Collections.Generic;
public string Name{get;set;}
public string Education{get;set;}
if(value.Contains("@") == true)
public Customer(string inName, string inEducation, string inEmail)
EmailLength = Email.Length;
public List<Customer> CustomerList = new List<Customer>();
CustomerList.Add(new Customer("John","Bachelor","john@gmail.com"));
CustomerList.Add(new Customer("David","Bachelor","david@iu.edu"));
CustomerList.Add(new Customer("Anderson","Master","anderson@iu.edu"));
CustomerList.Add(new Customer("Mary","Master","maryiu.edu"));
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.Name + "'s Email Length: " + 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));