Пример #1
0
 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}");
 }
Пример #2
0
 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}");
 }
Пример #3
0
 public void WriteProperties()
 {
     Console.WriteLine(
         $"Дата и время будильника: {AlarmDate}\n" +
         $"Сообщение: {AlarmMessage}\n" +
         $"Просрочено ли событие: {IsOutdated}\n" +
         $"Времени до срабатывания будильника: {TimeToAlarm.ToString(@"dd\ hh\:mm\:ss")}\n");
 }
Пример #4
0
 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();
 }