public void WriteProperties() { Console.WriteLine($"{nameof(AlarmDate)} : {AlarmDate.ToString("MM/dd/yyyy HH:mm:ss")}"); Console.WriteLine($"{nameof(AlarmMessage)} : {AlarmMessage}"); Console.WriteLine($"{nameof(TimeToAlarm)} : {TimeToAlarm.ToString("c")}"); Console.WriteLine($"{nameof(IsOutdated)} : {IsOutdated}"); }
public virtual void WriteProperties() { Console.WriteLine($"{ GetType().Name}\n Your alarm was set on " + $"{ AlarmDate.ToString("MM/dd/yyyy HH:mm:ss")}" + $"\n with message: {AlarmMessage}" + $"\n time before alarm you have: {TimeToAlarm.ToString()}" + $"\n {nameof(IsOutdated)}:{IsOutdated}"); }
public void WriteProperties() { Console.WriteLine( $"Дата и время будильника: {AlarmDate}\n" + $"Сообщение: {AlarmMessage}\n" + $"Просрочено ли событие: {IsOutdated}\n" + $"Времени до срабатывания будильника: {TimeToAlarm.ToString(@"dd\ hh\:mm\:ss")}\n"); }
public override void WriteProperties() { Console.WriteLine(GetType().Name); Console.WriteLine($"{nameof(AlarmDate)} : {AlarmDate.ToString("MM/dd/yyyy HH:mm:ss")}"); Console.WriteLine($"{nameof(AlarmMessage)} : {AlarmMessage}"); Console.WriteLine($"{nameof(TimeToAlarm)} : {TimeToAlarm.ToString("c")}"); Console.WriteLine($"{nameof(IsOutdated)} : {IsOutdated}"); Console.WriteLine($"{nameof(PhoneNumber)} : {PhoneNumber}"); Console.WriteLine(); }