Code:
using System;
using System.IO;
namespace TimeTress
{
class Program
{
static void Main(string[] args)
{
GetString("../../../../timeline.csv");
GetString("../../../../people.csv");
}
static void GetString(string path)
{
if (File.Exists(path))
{
foreach (var line in File.ReadAllLines(path))
{
Console.WriteLine(line);
}
}
else
{
Console.WriteLine($"Файл не найден по пути {Path.GetFullPath(path)}");
}
}
}
}
It is necessary that the result should not be simply displayed, but written into two different variables, preferably into the arrays string [] [] or string [], so that you can work with them in the future. File text: timeline: {event_date}; {event_description} people: {Name}; {Date of Birth}; {Date of death}