Is it a best practice to initialize class dependencies in a constructor or should a class be initialized in the method where it is used. Let's say we have the following situation, and PriceCalcService is used only in a couple of methods. Order also takes other parameters, and sets its state.public class ShippingService() { .......... }public class Order() {    public string SomeOrderProperty;    private PriceCalcService priceCalcService;    public Order(string someOrderproperty) {         priceCalcService= new PriceCalcService();         SomeOrderProperty = someOrderProperty;    }    public void Method1() {         PriceCalcService.MethodX();    }    .......}Or should the PriceCalcService be initialized only in the methods that use it?public class PriceCalcService() { .......... }  public class Order() {    public string SomeOrderProperty;    public Order(string someOrderproperty) {         SomeOrderProperty = someOrderproperty;    }    public void Method1() {         new PriceCalcService().MethodX();    }    .......}First example: Advantage: We can see the dependencies               Disadvantage: We instantiate a class even if it is not used. Which method should I choose?
Constructor containing class dependencies
dependencies;constructors