Код: Выделить всё
public class Employee
{
public Employee()
{
}
public int Id { get; set; }
public string Name { get; set; }
public Employee Manager { get; set; }
}
Код: Выделить всё
2;John;1
1;James;
3;Linda;1
Код: Выделить всё
...
var lines = File.ReadAllLines(this.FilePath);
foreach (var line in lines)
{
var parts = line.Split(';');
var emp = new Employee();
emp.Id = int.parse(parts[0]);
emp.Name = parts[1];
emp.Manager = ????
}
return employees;
}