private static void Main(string[] args) { var journal = new Journal(); journal.AddEntry("First entry"); journal.AddEntry("Second entry"); Console.WriteLine(journal); var persistance = new Persistance(); var fileName = @"C:\Users\smajl\Documents\Tajib\Programming\journal.txt"; persistance.SaveToFile(journal, fileName, true); }
static void Main(string[] args) { Journal journal = new Journal(); journal.AddEntry("Today was cold"); journal.AddEntry("Today was a good day for ice cream"); Console.WriteLine(journal); Persistance persistance = new Persistance(); string fileName = @"c:\temp\journal.txt"; persistance.SaveToFile(journal, fileName, true); Process.Start(fileName); }