State & DI interview questions

15 real State & DI questions from the Blazor 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 @inject directive?

Junior
  1. A.a registered class holding shared application data that components inject to read and update common values across pages
  2. B.a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  3. C.the directive that supplies a registered service instance into a component property
  4. D.the component that wraps a subtree to share a value with all descendants implicitly
Reveal the answer + AI explanation — free account

2. Which term means: "the directive that supplies a registered service instance into a component property"?

Junior
  1. A.Scoped service lifetime
  2. B.OwningComponentBase
  3. C.@inject directive
  4. D.Container-managed state service
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.@inject directive — the component that wraps a subtree to share a value with all descendants implicitly
  2. B.@inject directive — a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  3. C.@inject directive — a registered class holding shared application data that components inject to read and update common values across pages
  4. D.@inject directive — the directive that supplies a registered service instance into a component property
Reveal the answer + AI explanation — free account

4. What is CascadingValue?

Mid
  1. A.the directive that supplies a registered service instance into a component property
  2. B.the component that wraps a subtree to share a value with all descendants implicitly
  3. C.a registered class holding shared application data that components inject to read and update common values across pages
  4. D.a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Mid
  1. A.CascadingValue — a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  2. B.CascadingValue — the directive that supplies a registered service instance into a component property
  3. C.CascadingValue — the component that wraps a subtree to share a value with all descendants implicitly
  4. D.CascadingValue — a registration where one instance is shared within a single user connection or request scope
Reveal the answer + AI explanation — free account

7. What is Scoped service lifetime?

Mid
  1. A.the component that wraps a subtree to share a value with all descendants implicitly
  2. B.a registered class holding shared application data that components inject to read and update common values across pages
  3. C.a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  4. D.a registration where one instance is shared within a single user connection or request scope
Reveal the answer + AI explanation — free account

8. Which term means: "a registration where one instance is shared within a single user connection or request scope"?

Mid
  1. A.OwningComponentBase
  2. B.Container-managed state service
  3. C.Scoped service lifetime
  4. D.@inject directive
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Scoped service lifetime — the component that wraps a subtree to share a value with all descendants implicitly
  2. B.Scoped service lifetime — a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  3. C.Scoped service lifetime — a registration where one instance is shared within a single user connection or request scope
  4. D.Scoped service lifetime — the directive that supplies a registered service instance into a component property
Reveal the answer + AI explanation — free account

10. What is Container-managed state service?

Senior
  1. A.the component that wraps a subtree to share a value with all descendants implicitly
  2. B.a registration where one instance is shared within a single user connection or request scope
  3. C.a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  4. D.a registered class holding shared application data that components inject to read and update common values across pages
Reveal the answer + AI explanation — free account

11. Which term means: "a registered class holding shared application data that components inject to read and update common values across pages"?

Senior
  1. A.Container-managed state service
  2. B.@inject directive
  3. C.CascadingValue
  4. D.Scoped service lifetime
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Senior
  1. A.Container-managed state service — a registered class holding shared application data that components inject to read and update common values across pages
  2. B.Container-managed state service — a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  3. C.Container-managed state service — the component that wraps a subtree to share a value with all descendants implicitly
  4. D.Container-managed state service — a registration where one instance is shared within a single user connection or request scope
Reveal the answer + AI explanation — free account

13. What is OwningComponentBase?

Senior
  1. A.the directive that supplies a registered service instance into a component property
  2. B.a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  3. C.a registered class holding shared application data that components inject to read and update common values across pages
  4. D.a registration where one instance is shared within a single user connection or request scope
Reveal the answer + AI explanation — free account

14. Which term means: "a base class that ties injected scoped services to the component's own lifetime so they dispose when it does"?

Senior
  1. A.OwningComponentBase
  2. B.CascadingValue
  3. C.@inject directive
  4. D.Scoped service lifetime
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Senior
  1. A.OwningComponentBase — a base class that ties injected scoped services to the component's own lifetime so they dispose when it does
  2. B.OwningComponentBase — the component that wraps a subtree to share a value with all descendants implicitly
  3. C.OwningComponentBase — the directive that supplies a registered service instance into a component property
  4. D.OwningComponentBase — a registered class holding shared application data that components inject to read and update common values across pages
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 State & DI free