public Automobile(Automobile c) { Model = c.Model; ProdYear = c.ProdYear; Name = c.Name; Type = c.Type; GarageNumber = c.GarageNumber; Status = c.Status; Project = c.Project; foreach (Part item in c.Parts) { Parts.Add(item); } }
static void Main(string[] args) { Automobile myAutomobile = new Automobile(); myAutomobile.Make = "Toyota"; myAutomobile.Model = "Corolla"; myAutomobile.Year = 2015; myAutomobile.EngineType = Engine.Hybrid; myAutomobile.TransmissionType = Transmission.Automatic; Console.WriteLine($"Now we have our {myAutomobile.Make} {myAutomobile.Model} {myAutomobile.Year}"); Console.ReadLine(); }
public CheckList(DateTime dt, Automobile c, string desc, string adv) { CreateDate = dt; Car = new Automobile(c); IssueDescription = desc; Advices = adv; }