using System.Collections.Generic;
public string Name {get; set;}
public string Education {get; set;}
public string Email {get; set;}
public Customer(string name, string education, string email)
static List<Customer> CustomerList;
public static void Main()
CustomerList = new List<Customer>();
Customer c1 = new Customer("John","Bachelor","john@gmail.com");
Customer c2 = new Customer("David","Bachelor","david@gmail.com");
Customer c3 = new Customer("Anderson","Master","anderson@gmail.com");
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.Email.PadRight(15) + "Length = " + 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));}