Пример #1
0
        public string[] getOutputFormat(bool simplifyHireDate = false)
        {
            string[] output = new string[employeesList.Count];

            for (int i = 0; i < employeesList.Count; i++)
            {
                output[i]  = employeesList[i].FullName + " ";
                output[i] += simplifyHireDate
                    ? FormatDateTime.yearsAndMonthsInString(employeesList[i].HireDate)
                    : FormatDateTime.getDateTimeInString(employeesList[i].HireDate);
            }

            return(output);
        }
Пример #2
0
 public override string ToString()
 => $"{FullName} {FormatDateTime.getDateTimeInString(HireDate)}";