Specifying type when resolving objects through Ninject
- by stiank81
Given the class Ninja, with a specified binding in the Ninject kernel I can resolve an object doing this:
var ninja = ninject.Get<Ninja>();
But why can't I do this:
Type ninjaType = typeof(Ninja);
var ninja = ninject.Get<ninjaType>();
What's the correct way of specifying the type outside the call to Get?