using System.Collections.Generic;
public string FirstName { get; set; }
public string LastName { get; set; }
public string PhoneNumber { get; set; }
public static List<Person> People = new List<Person>();
private static void AddPerson()
Person person = new Person();
Console.Write("Enter First Name: ");
person.FirstName = Console.ReadLine();
Console.Write("Enter Last Name: ");
person.LastName = Console.ReadLine();
Console.Write("Enter Phone Number: ");
person.PhoneNumber = Console.ReadLine();
Console.Write("Contact added sucessfully");
private static void PrintPerson(Person person)
Console.WriteLine("First Name: " + person.FirstName);
Console.WriteLine("Last Name: " + person.LastName);
Console.WriteLine("Phone Number: " + person.PhoneNumber);
Console.WriteLine("-------------------------------------------");
private static void RemovePerson()
Console.WriteLine("Enter the first name of the person you would like to remove.");
string firstName = Console.ReadLine();
Person person = People.FirstOrDefault(x => x.FirstName.ToLower() == firstName.ToLower());
Console.WriteLine("That person could not be found. Press any key to continue");
Console.WriteLine("Are you sure you want to remove this person from your address book? (Y/N)");
Console.WriteLine("Person removed. Press any key to continue.");
private static void ListPeople()
Console.WriteLine("Your address book is empty. Press any key to continue.");
Console.WriteLine("Here are the current people in your address book:\n");
foreach (var person in People)
public static void Main()
Console.WriteLine("Welcome to Contact list");