Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface ISomething
- {
- void DoSomething();
- }
- public class SomethingA : ISomething
- {
- public void DoSomething()
- {
- }
- }
- public class SomethingAB : ISomething
- {
- public void DoSomething()
- {
- }
- }
- public class Different
- {
- private ISomething ThisSomething;
- public Different(ISomething Something)
- {
- ThisSomething = Something;
- }
- }
- //NOTES: In some circumstances in your app you may want SomethingA to be used in class Different and sometimes SomethingAB. How do you tell the IOC when to use the relevant class?
Add Comment
Please, Sign In to add comment