I use MVVM light and set the binding as follows:
class TestModule:NinjectModule { public override void Load() { Bind<ICollection<Element>>().To<Collection<Element>>(); Bind<Element>().ToSelf(); } }
When I try to get an ICollection, I get a collection with an ONE element. I am expecting an exmpty collection.
var _kernel = new StandardKernel(new TestModule()); var col = _kernel.Get<ICollection<Element>>(); Console.WriteLine("Count={0}", col.Count);
magol source share