using System.Collections.Generic;
private Dictionary<string,int> dates = new Dictionary<string,int>();
public Person( string name,string gender,int age)
public void Add(string name,int month)
foreach( KeyValuePair<string,int> date in dates)
Console.WriteLine("{0} dated with {1} for {2} months",Name,date.Key,date.Value);
Console.WriteLine("Please enter a person's Name:");
string name = Console.ReadLine();
Console.WriteLine("Plese enter the gender(M/F)");
string gender = Console.ReadLine();
Console.WriteLine("Plese enter the age");
int age = int.Parse(Console.ReadLine());
Person person1 = new Person(name,gender,age);
Person person2 = new Person(Nick,M,17);
person1.Add(person2.Name,i);