Possible Duplicate:
What is Inversion of Control?
I am not familiar with Inversion of Control (IoC). What is IoC and how can applications benefit from using IOC. How is it implemented in .NET with C#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have a set of classes that depend on eachother, it’s difficult to replace some class for another (better/cheaper/faster) class that does the same job. In order to make your code more flexible, you can use dependency injection.
An easy to use DI framework for C# is Ninject. They have a very understandable tutorial about this subject.
Links:
http://ninject.org/learn
http://blog.andresays.org/2010/10/dependency-injection-with-ninject-and-asp-net-mvc/
Good luck!