public static Mail chooseMessage(SortedList<int, Mail> choice)
 {
     Console.WriteLine("Write the number of the mail to read it ");
     string choiceKey = Console.ReadLine();
     int userChoice = Int32.Parse(choiceKey);
                 
     Mail mailChoice = new Mail();
     mailChoice = choice[userChoice];
     
     return mailChoice;
                 
 }
        public static void deleteMessage( Mail selectedMail) //Ha ett mail som imparameter
        {
            Messages messageObject = new Messages();
            
            try
            {
               messageObject.RemoveMessage(selectedMail);

            }
            catch (FormatException)
            {
                
            }

        }
        public static void showMessage(Mail message)
        {
            Console.Clear();
            Console.ForegroundColor = ConsoleColor.DarkCyan;
            Console.WriteLine("___________________________________________");
            Console.WriteLine("Your Message:");
            Console.WriteLine("\n-------------------------------------------");
            Console.Write("\nFrom: " + message.Sender + "     ");
            Console.WriteLine("To: " + message.Receiver + "\n");
            Console.WriteLine("Title: " + message.Subject + "\n");
            Console.WriteLine(message.Message + "\n");
            Console.WriteLine("Came in at: " + message.Time + "\n");
            Console.WriteLine("__________/)_/)__________/)________________");
            message.isSeen = true;
            Console.ResetColor();


        }
 internal void CreateMessage(Mail newMail)
 {
     SavedList.Add(BaseMessageHandler.GetNewKey(SavedList), newMail);
     saveTheFile();
 }
 public void RemoveMessage(Mail mail)
 {
     SavedList.RemoveAt(SavedList.Values.IndexOf(mail));
     saveTheFile();
     
 }