public Car(SerializationInfo info, StreamingContext ctxt) { this.make = (string)info.GetValue("Make", typeof(string)); this.model = (string)info.GetValue("Model", typeof(string)); this.year = (int)info.GetValue("Year", typeof(int)); this.owner = (Owner)info.GetValue("Owner", typeof(Owner)); }
public Car(string model, string regNo, Owner owner) { Model = model; RegNo = regNo; Owner = owner; }