Skip to main content

Explain IOptions, IOptionsSnapshot, and IOptionsMonitor.

Mid .NET Core
Quick Answer IOptions: singleton, reads config once at startup, doesn't see runtime changes. IOptionsSnapshot: scoped, re-reads config each request รขโ‚ฌโ€ picks up changes between requests. IOptionsMonitor: singleton with change notification รขโ‚ฌโ€ OnChange() fires immediately when config files change. Use Monitor for services that need live config updates.

Answer

IOptions: One-time config snapshot at startup.
IOptionsSnapshot: Reloaded per request.
IOptionsMonitor: Real-time change tracking + callbacks. Used for dynamic config updates.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice