Dependency Injection interview questions

15 real Dependency Injection questions from the .NET MAUI bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Built-in container?

Junior
  1. A.the service registry exposed on the builder Services collection for wiring up dependencies
  2. B.a registration that yields a fresh instance each time the dependency is requested
  3. C.a registration that shares one instance for the entire lifetime of the app
  4. D.adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Built-in container — the service registry exposed on the builder Services collection for wiring up dependencies
  2. B.Built-in container — adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  3. C.Built-in container — supplying a class its dependencies automatically through its parameters when the container creates it
  4. D.Built-in container — a registration that yields a fresh instance each time the dependency is requested
Reveal the answer + AI explanation — free account

4. What is Service registration?

Mid
  1. A.supplying a class its dependencies automatically through its parameters when the container creates it
  2. B.the service registry exposed on the builder Services collection for wiring up dependencies
  3. C.adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  4. D.a registration that yields a fresh instance each time the dependency is requested
Reveal the answer + AI explanation — free account

5. Which term means: "adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later"?

Mid
  1. A.Singleton lifetime
  2. B.Service registration
  3. C.Constructor injection
  4. D.Built-in container
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.Service registration — adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  2. B.Service registration — a registration that yields a fresh instance each time the dependency is requested
  3. C.Service registration — a registration that shares one instance for the entire lifetime of the app
  4. D.Service registration — the service registry exposed on the builder Services collection for wiring up dependencies
Reveal the answer + AI explanation — free account

7. What is Constructor injection?

Mid
  1. A.the service registry exposed on the builder Services collection for wiring up dependencies
  2. B.a registration that yields a fresh instance each time the dependency is requested
  3. C.a registration that shares one instance for the entire lifetime of the app
  4. D.supplying a class its dependencies automatically through its parameters when the container creates it
Reveal the answer + AI explanation — free account

8. Which term means: "supplying a class its dependencies automatically through its parameters when the container creates it"?

Mid
  1. A.Constructor injection
  2. B.Singleton lifetime
  3. C.Transient lifetime
  4. D.Built-in container
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Constructor injection — a registration that yields a fresh instance each time the dependency is requested
  2. B.Constructor injection — a registration that shares one instance for the entire lifetime of the app
  3. C.Constructor injection — adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  4. D.Constructor injection — supplying a class its dependencies automatically through its parameters when the container creates it
Reveal the answer + AI explanation — free account

10. What is Transient lifetime?

Mid
  1. A.adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  2. B.a registration that yields a fresh instance each time the dependency is requested
  3. C.the service registry exposed on the builder Services collection for wiring up dependencies
  4. D.supplying a class its dependencies automatically through its parameters when the container creates it
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.Transient lifetime — supplying a class its dependencies automatically through its parameters when the container creates it
  2. B.Transient lifetime — adding a type to the container with singleton, scoped or transient lifetime so it can be resolved later
  3. C.Transient lifetime — a registration that shares one instance for the entire lifetime of the app
  4. D.Transient lifetime — a registration that yields a fresh instance each time the dependency is requested
Reveal the answer + AI explanation — free account

13. What is Singleton lifetime?

Mid
  1. A.a registration that yields a fresh instance each time the dependency is requested
  2. B.a registration that shares one instance for the entire lifetime of the app
  3. C.the service registry exposed on the builder Services collection for wiring up dependencies
  4. D.supplying a class its dependencies automatically through its parameters when the container creates it
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Singleton lifetime — a registration that shares one instance for the entire lifetime of the app
  2. B.Singleton lifetime — a registration that yields a fresh instance each time the dependency is requested
  3. C.Singleton lifetime — supplying a class its dependencies automatically through its parameters when the container creates it
  4. D.Singleton lifetime — the service registry exposed on the builder Services collection for wiring up dependencies
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Dependency Injection free