コード例 #1
0
ファイル: Program.cs プロジェクト: bbrueckler/oom
 public static string PrintBike(Sportbike s)
 {
     return(s.Manufacturer +
            " " + s.Model + ": " +
            s.GetMileage() + " km, " +
            "Service in: " + s.GetNextService() + " km");
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: bbrueckler/oom
 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);
     }
 }