public static string PrintBike(Sportbike s) { return(s.Manufacturer + " " + s.Model + ": " + s.GetMileage() + " km, " + "Service in: " + s.GetNextService() + " km"); }
public static IEnumerable <Sportbike> CreateBike() { while (true) { var b = new Sportbike(GetRandom.GetManuf(), GetRandom.GetModel() + " " + (rand.Next(7, 13) * 100 - 10), rand.Next(1, 99999), rand.Next(5, 20) * 1000); yield return(b); } }