public Audi(AudiModel Model) : base("Germany") { this.Model = Model; if (RegistrationNumber != "") { TransportInfo = ToString(Model) + "[" + RegistrationNumber + "]"; } else { TransportInfo = ToString(Model) + " without registration number"; } }
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"; } }
private static string ToString(AudiModel Model) { return(Model.ToString().Replace('_', ' ')); }