dependency injection not using the constructor

Jun 3, 2010 at 12:25 PM

up until now i was using injection only within the constructor, like so:

protected readonly ILogger theLogger;

public MyClass(ILogger logger)

{

theLogger = logger;

}

is there any other way of injecting? without using the constructor?

Jun 3, 2010 at 5:16 PM

You can inject properties or use methods. This is all explained in the documentation and the hands-on labs.