concept new keyword in category .net

appears as: new keyword, The new keyword
Dependency Injection in .NET

This is an excerpt from Manning's book Dependency Injection in .NET.

In the context of managing dependencies, INVERSION OF CONTROL accurately describes what we’re trying to accomplish. In Mary’s application, the code directly controls its dependencies: when the ProductService needs a new instance of the CommerceObjectContext class, it simply creates an instance using the new keyword. When the HomeController needs a new instance of the ProductService class, it, too, news up an instance. The application is in total control. That may sound powerful, but it’s actually limiting. I call this the CONTROL FREAK anti-pattern. INVERSION OF CONTROL instructs us to let go of that control and let something else manage the dependencies.