public string Task2() { var timeMin = RD .Where(s => s.SectionId == 0) .Where(s => s.EnterOrLeave) .Min(s => s.TimeLng); int minIndex = RD.FindIndex(x => x.TimeLng == timeMin); var timeMax = RD .Where(s => s.SectionId == 0) .Where(s => s.EnterOrLeave) .Max(s => s.TimeLng); int maxIndex = RD.FindIndex(x => x.TimeLng == timeMax); return($"\nAz első az {RD[minIndex].GuestId} sz. kuncsaft, " + $"{RD[minIndex].TimeStr}-kor,\n " + $"az utolsó az {RD[maxIndex].GuestId} sz., " + $"{RD[maxIndex].TimeStr}-kor \nlépett ki az öltözőből"); }