Exemple #1
0
 public LogisticApp(string type)
 {
     this.t = type switch
     {
         "car" => new RoadLogistics(type),
         "ship" => new RoadLogistics(type),
         "sea" => new SeaLogistics(),
         _ => null
     };
 }
Exemple #2
0
 static void ClientMethod(Logistics creator)//
 {
     Console.WriteLine($"Client not concern the creator class. It still work. {creator.PlanDelivery()}");
 }