mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
23 lines
437 B
C#
23 lines
437 B
C#
namespace Packt.Shared;
|
|
|
|
public class Employee : Person
|
|
{
|
|
public string? EmployeeCode { get; set; }
|
|
public DateTime HireDate { get; set; }
|
|
|
|
public new void WriteToConsole()
|
|
{
|
|
WriteLine(format:
|
|
"{0} was born on {1:dd/MM/yy} and hired on {2:dd/MM/yy}",
|
|
arg0: Name,
|
|
arg1: DateOfBirth,
|
|
arg2: HireDate);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{Name}'s code is {EmployeeCode}";
|
|
}
|
|
|
|
}
|