I have this classes and interfaces
public interface IA{
void Load();
}
public interface IB : IA{
}
public class B : IB{
public void Load(){
//some code
}
}
and I register the IB
for type B
Microsoft Unity
resolves IB
to correct type which is B
, but when I try to call Load it shows an error IB does not contain a definition for 'Load'
Update
This is my unity configuration
var unityContainer = new UnityContainer();
unityContainer.RegisterType<IB, B>();
var obj = unityContainer.Resolve<IB>();
obj.Load()