using System.Collections.Generic;
public static void Main()
Console.WriteLine("Hello World");
var PhoneBook = new List<PhoneBookEntry>();
var newEntry = new PhoneBookEntry()
PhoneNumber = "555-555-5555",
MailAddress = "123 SomeStreet",
var entry2 = new PhoneBookEntry();
entry2.SurName = "Smith";
entry2.PhoneNumber = "555-555-5555";
entry2.MailAddress = "123 SomeStreet";
entry2.City = "New York";
foreach (var phoneEntry in PhoneBook)
Console.WriteLine("Name: " + phoneEntry.Name + " " + phoneEntry.SurName);
public class PhoneBookEntry
public string Name { get; set; }
public string SurName { get; set; }
public string PhoneNumber { get; set; }
public string MailAddress { get; set; }
public string City { get; set; }