Key Concepts

Review core concepts you need to learn to master this subject

Dependency

// Object A - the class that depends on Object B class Reviewer { private EmailSender Sender = new EmailSender(); public SendReview(string lesson, string comments) { Sender.SendReview(lesson, comments); } } // Object B - the dependency class EmailSender { public SendReview(string lesson, string comments) { // Send an email with the Lesson and Comments } } static void Main(string[] args) { Reviewer reviewer = new Reviewer(). SendReview("Dependecy Injection", "Learned a ton!"); }

When one object (Object A) references another object (Object B), using its properties and methods, it means that the first object (A) depends on the second (B), making the second object (B) a dependency.

Dependency Injection
Lesson 1 of 1

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo