Exemple #1
0
 public static Automobile getInstance(Engine eng, Kuzov kuz, string fac)
 {
     if (instance == null)
     {
         instance = new Automobile(eng, kuz, fac);
     }
     return(instance);
 }
Exemple #2
0
 public void CreateAutomobile(Engine eng, Kuzov kuz, string fac)
 {
     Automobile = Automobile.getInstance(eng, kuz, fac);
     Automobile.Engine.Show();
     Console.WriteLine(Automobile.Kuzov.ToString(), Automobile.Factory);
 }