Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 1
    I like your answer but how can I validate it? Commented Aug 17, 2019 at 3:37
  • 3
    Thought experiment: You have three classes that meet the SOLID principles. You use the new keyword to stand up an object graph using those three classes. The object graph is still SOLID. Now you use an IoC container to stand up that same object graph instead. Is the object graph still SOLID? Commented Aug 17, 2019 at 3:46
  • I would have thought so but judging by your wording, I'm guessing not? Care to explicate why not? Commented Aug 17, 2019 at 3:49
  • 3
    Yes, the object graph is still SOLID. It doesn't matter how you create your objects. You can create them with the new keyword. You can create them with Activator.CreateInstance. You can create them via carrier pigeon. They will still be the same objects when you are done. Therefore they will still have the same SOLID characteristics. Commented Aug 17, 2019 at 3:51
  • While I think you're right, I still don't understand how the thought experiment validates the answer. Commented Aug 17, 2019 at 4:42