Пример #1
0
 public Audi(AudiModel Model) : base("Germany")
 {
     this.Model = Model;
     if (RegistrationNumber != "")
     {
         TransportInfo = ToString(Model) + "[" + RegistrationNumber + "]";
     }
     else
     {
         TransportInfo = ToString(Model) + " without registration number";
     }
 }
Пример #2
0
 public Audi(AudiModel Model, ConsoleColor Color) : base("Germany", Color)
 {
     this.Model = Model;
     if (RegistrationNumber != "")
     {
         TransportInfo = ToString(Model) + "[" + RegistrationNumber + "]";
         Console.WriteLine(TransportInfo + " get the registration number [" + RegistrationNumber + "]");
     }
     else
     {
         TransportInfo = ToString(Model) + " without registration number";
     }
 }
Пример #3
0
 private static string ToString(AudiModel Model)
 {
     return(Model.ToString().Replace('_', ' '));
 }