using System.Collections.Generic;
public string Name{get; set;}
public string Education {get;set;}
if (value.IndexOf("@")>0)
public Customer(string n, string e, string em)
int emaillength = Email.Length;
public List<Customer> CustList = new List<Customer>();
newcust = new Customer ("John", "Bachelor", "john@gmail.com");
newcust = new Customer ("David", "Bachelor", "david@iu.edu");
newcust = new Customer ("Anderson", "Master", "anderson@iu.edu");
newcust = new Customer ("Mary", "Master", "maryiu.edu");
Console.WriteLine("Show All List");
foreach (Customer c in CustList)
Console.WriteLine(c.Name.PadRight(25) + c.Education.PadRight(25) + c.Email.PadRight(25));
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(25) + c.Education.PadRight(25) + c.Email.PadRight(25));