tag:blogger.com,1999:blog-4208378482021219922.post3619629353718834677..comments2024-03-27T03:23:54.906-07:00Comments on Aspiring Architect: Dependency Injection (DI / IOC)Pratap Reddy Pilakahttp://www.blogger.com/profile/17141976956878163883noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4208378482021219922.post-80288656604506560422011-12-24T18:32:01.242-08:002011-12-24T18:32:01.242-08:00In the above example quoted, the wand type is alre...In the above example quoted, the wand type is already induced into Harry potter class using constructor injection. so,no need to pass it as a parameter exclusively.<br />Secondly,the wand is of IWand and it is not concretely implemented.<br />Thanks for your suggestion/comments.Pratap Reddy Pilakahttps://www.blogger.com/profile/17141976956878163883noreply@blogger.comtag:blogger.com,1999:blog-4208378482021219922.post-28093759553955940152011-12-24T08:20:49.605-08:002011-12-24T08:20:49.605-08:00just to understand would it harm or defeat the pur...just to understand would it harm or defeat the purpose, if we make the parameter of castspell based on Interface and remove the concrete implemetation like......<br /><br />public void CastSpell(IWand wand)<br /> {<br /> Console.WriteLine("Harry Potter casted the spell with his " + wand.Type + " Wand");<br /> }Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4208378482021219922.post-7878016174675201232011-12-24T08:10:34.824-08:002011-12-24T08:10:34.824-08:00Good to read Pratap.. not sure if you remember me....Good to read Pratap.. not sure if you remember me... But i do remember you and cherish my memories at Deloitte as well :) Alas, life and almighty had other things planned for me ;)<br /><br />Will follow your blog. :)<br /><br />S.V. Sita KiranAnonymousnoreply@blogger.com