C# interview questions for web devs
Just a list of subjects, topics, and questions that I believe developers at junior, middle, and senior levels should know. You can use it as a roadmap, to prepare for an interview, or to conduct one 🙃.
Enjoy 😉
Code conventions
junior
- knows programming language’s conventions
middle
- can introduce changes to the codebase without breaking existing conventions
senior
- can set up linting to automate code conventions (Roslyn Analysers, StyleCop, FxCop, SonarLint)
Refactoring
junior
- what is Refactoring?
- what is Clean Code?
- can simplify
if/elsestatement
middle
- refactoring techniques (extract method, rename method, etc)
- code smells (long methods, long class, primitive obsession, etc)
senior
- knows code metrics (depth of inheritance, coupling, cyclomatic complexity)
Debugging
junior
- debugging in Visual Studio
- settings breakpoints
- conditional breakpoints
- changing runtime values
middle
Stopwatch- know and can use DevTools
senior
- remote debugging
- knows how to debug multi-thread app
Git
junior
- GitHub
- basic operations (
init,clone,fetch,pull,commit,push) - branching
.gitignore
middle
- stash
- rebase vs merge
- branching models (GitFlow, GitHub Flow, etc)
- git blame
senior
.gitattributes- checkout on a commit
- cherry-pick
- squash
Source Code Review
junior
- knows what a Pull Request is
middle
- knows how to conduct code review and provide useful and understandable feedback
senior
- can set up, drive, and control code review practices within a team
- has a check-list for PR review
- writes architecture tests to sustain conventions
- automatization of code review
Data Structures
junior
- array
- matrix
- linked list
- LIFO vs FIFO
- stack
- queue
- binary tree
middle
- hash table. how does a hash table behave when there is a collision?
- hash function. what happens when mutable fields are used in the hash function? what is a collision in hash tables?
senior
- graph
Algorithms
junior
- O notation, space/time complexity
- swap values in an array
- min, max, average in an array
- recursion
- sorting (bubble sort, insertion sort, selection sort)
- searching (linear search, binary search, knows precondition for binary search)
middle
- quick sort
senior
- tree traversal (with queue, with stack, NLR, LRN, RLN)
- divide-and-conquer algorithms
Object-Oriented Programming
junior
- Abstraction, Encapsulation, Inheritance, Polymorphism
- can explain OOD Principles in examples
- DRY
- KISS
- YAGNI - primitive obsession issue
middle
senior
- aspect-oriented programming. how to implement cross-cutting concerns?
- rich vs anemic model
- strong and weak encapsulation
Functional Programming
junior
middle
senior
AI
junior
- can use AI tools (e.g., Copilot, ChatGPT) for code snippets, explanations, and documentation
- can generate unit tests or boilerplate with AI
middle
- can evaluate AI-generated output critically, refine prompts, and integrate AI into the development workflow
- uses Claude for reasoning-heavy tasks (e.g., refactoring, architecture explanations)
senior
- ensures compliance, privacy, and security in AI-assisted development
- sets up automation with AI (code review, documentation generation, test generation)
- can integrate AI APIs (OpenAI, Anthropic, local LLMs) into internal tools and workflows
- evaluates new AI tools, models, and frameworks, guiding adoption strategically
.NET
junior
- what .NET is
- can create a custom library
- stack vs heap
middle
- .Net CLI
- difference between compile time and runtime
senior
Core C#
junior
- basic types, enums, value types vs reference types
structvsclassstring,StringBuilder, interpolation,string.Format()- boxing, unboxing
- type casting (
is,as, type conversion operator) - method overload vs method optional parameters, named parameters
- extension methods
in,ref,out,paramsinterfacevsabstract class, inheritance- access modifiers (
public,private,protected) virtualvsnewvsoverridestatic classand static class members- indexers and properties
- generics, generic constraints
- exceptions,
finally - linq.
First()vsFirstOrDefault()vsSingle()vsSingleOrDefault() - garbage collection,
IDisposablevs Finalizer,usingstatement
middle
- what’s new in C#?
sealed class,partial class- access modifiers (
internal) tuple, namedtuple, deconstructionconstvsstatic readonly- understand regex and its usage
Equals(), inheritEqualityComparer<T>,Comparer<T>.DefaultGetHashCode(),HashCode.Combine()- rethrowing exception (
throw exvsthrow),whenin a catch clause - deferred linq execution
- basic of working with files.
File,FileInfo, Streams (Stream,FileStream, etc) HttpClient
senior
- dynamic
- can work efficiently with time and timezones (
DateTime,TimeSpan,DateTimeOffset,DateOnly,TimeOnly,TimeZoneInfo) - string interning, string culture,
StringComparer - invariance, covariance, contravariance
record,readonly struct- access modifiers (
protected internal,private protected,file), nested classes access - streams in detail (backing storage, decorators, adapters, working efficiently with
MemoryStream) - garbage collection in details (stack, heap, large object heap)
- linq.
DefaultIfEmpty(),Zip(),Aggregate() HttpClient- how to create one? (port exhaustion and DNS change problems)
Collections
junior
- array
- generic collections (
List<T>,LinkedList<T>,Dictionary<K, V>,HashSet<T>,Stack<T>,Queue<T>,PriorityQueue<T, P>)
middle
- interfaces (
ICollection<T>,IList<T>,IDictionary<K, V>) - readonly interfaces (
IEnumerable<T>,IReadOnlyList<T>,IReadOnlyDictionary<K, V>) ObservableCollection<T>- iterators,
IEnumerator(MoveNext(),Current,Reset())
senior
ILookup<K, V>Enumerable.SequenceEqual()- base classes for custom collections (
Collection<T>,KeyedCollection<K, V>) - readonly collections (
ReadOnlyCollection<T>,ReadOnlyDictionary<K,V>),Array.AsReadOnly() - concurrent collections (
BlockingCollection<T>,ConcurrentBag<T>,ConcurrentDictionary<K, V>,ConcurrentQueue<T>,ConcurrentStack<T>) - immutable collections
- frozen collections
- create an empty collection (
Array.Empty<int>(),Enumerable.Empty<int>(), ImmutableArray<T>.Empty,ImmutableDictionary<TKey,TValue>.Empty,FrozenDictionary<TKey,TValue>.Empty, etc) yield returnin detailsIAsyncEnumerable
Delegates
junior
- delegates, lambda expressions
- understand events
Action,Func,Predicate
middle
- create custom delegate
- local functions
senior
- lambda closures
- combine delegates
- create event,
EventHandler,EventArgs - event forwarding (
add,removekeyword)
Reflection
junior
- basic understanding of reflection
- attributes
.GetType()vstypeof()
middle
- create a custom attribute,
AttributeUsage
senior
- capable of applying reflection
- expression trees
Activator.CreateInstance<T>(),Activator.CreateInstance(Type t)- invoking instance’s methods, invoking static methods
Multithreading
junior
- being able to use
Task
middle
- difference between parallel and asynchronous execution
- knows a variety of timers and the differences between them
- understand synchronization issues (deadlock and race condition)
- using
lock Task.WhenAll()CancellationToken. Knows how to cancelTask. Cancel HTTP request in ASP. Write your own methods that support cancellation.async voidissues
senior
- synchronization primitives (
Mutex,Monitor,Semaphore,SemaphoreSlim) - difference between
ThreadandTask TaskCompletionSource- exception handling, exceptions in
Task.WhenAll() .ConfigureAwait(false), synchronization context- distributed lock
- optimistic locking, pessimistic locking
- optimize IO/CPU bound operations
Libraries
junior
- what is NuGet?
- Moq
- Swagger
Newtonsoft.JsonorSystem.Text.Json- AutoMapper
middle
- FluentValidation
- Autofac, Scrutor (DI registration with assembly scanning)
- FluentAssertion
- Bogus
- Semantic Versioning
- Local SMTP server (Papercut-SMTP / Mailpit / etc)
- Temp Mail
senior
- Polly for fault handling (Retry, Circuit-Breaker)
- BenchmarkDotNet
- SignalR
- Refit
- FusionCache
- Ocelot
- Quartz vs Hangfire vs
BackgroundService - NBomber
- ngrok
- T4 Templates
Networking
junior
- JSON and XML
- HTTP methods (
GET,POST,PUT,DELETE, etc) GETvsPOST- HTTP response groups (
1XX,2XX,3XX,4XX,5XX) - HTTP headers
- REST
- knows the basic difference between HTTP and HTTPS
middle
senior
- can explain the basics of the HTTP request flow
- knows Postman in advance (creating the environment, using variables, etc)
- API Versioning
- Rate Limiting
- Polling vs WebHooks
- WebSockets
- gRPC
- GraphQL
ASP .NET API
junior
- MVC pattern
- routing
- model validation with attributes
- dependency injection
- middleware
- swagger
- environment configurations (
appsettings.json) - configuration binding,
IOptions
middle
- filters. filters vs middlewares
- exception handling
- FluentValidation
- environment configurations (
appsettings.dev.json, user secrets, environment variables, command line arguments) IHostedService/BackgroundService
- what lifecycle doesBackgroundServicehave?
- how do you inject a service into theBackgroundService?
senior
- run web service in the integration test
- configuration binding,
IOptionsSnapshot,IOptionsMonitor - can service with any lifecycle be injected any other? building dependency graph? when error visible (runtime vs on start)?
- advanced injection technique
- assembly scanning
-IServiceScopeFactory
- inject services regardless of lifecycle
- register service with multiple interfaces
- inject multiple services
-TryRegister
- resolve service with multiple implementations - minimal API
ASP.NET MVC
junior
- MPA
- understand ASP.Net MVC conventions
- creating a view, passing data between views and controllers
- razor syntax
- configuration binding,
IOptions
middle
- partial views
- exception handling
FluentValidation- environment configurations (
appsettings.dev.json, user secrets, environment variables, command line arguments) IHostedService/BackgroundService- run web service in the integration test
senior
Web Security
junior
- authorization vs authentication
- knows how to store passwords in DB (encryption, hashing, salt)
- knows what hash function is
- hashing vs encryption vs encoding vs serializing
middle
- knows basic auth schemes (Basic, Cookie, JWT, API key)
- role-based, policy, claims authorization
- JWT
- what claims are?
- registered claims vs custom claims
- issuer claim? audience claim? - can implement JWT authentication
senior
- two-factor authentication
- symmetric encryption vs asymmetric encryption
- types of tokens and their usage:
- access token
- refresh token
- ID token - OAuth 2.0
- client types
- authorization server endpoints
- authorization flows (code flow, implicit flow, client credentials). in which cases which should be used? - SSO
- OpenID
- SAML
- Identity Server
- Active Directory
- OTP (one-time password)
- self-contained vs reference token
- cross-origin resource sharing (CORS) policies
- knows and can prevent password attacks
- brute force
- dictionary attack
- rainbow table attack - knows and can prevent vulnerabilities
- DDoS attack
- SQL injection attacks
- open redirect URL attacks
- cross-site scripting attack (XSS)
- cross-site request forgery (CSRF)
- clickjacking
- replay attack. The purpose ofnonce
SQL Databases
junior
- data types
- relational model design (one-to-one, one-to-many, many-to-many)
CREATE,ALTER,DROPINSERT,UPDATE,DELETESELECT,WHERE,LIKE,ORDER BY,GROUP BY,HAVING,DISTINCTJOINSAVG,SUM,COUNT,MAX,MINUNIONvsUNION ALL
middle
- ACID
- CAP
- normalization (1NF, 2NF, 3NF)
- clustered and non-clustered indexes. should we create an index for a bool column? what about
IsDeleted? Index sequential number vs GUID? - unique and foreign keys
- check constraints
- transactions
- views, materialized views
- cursors
- soft delete vs hard delete
- Cartesian explosion problem
- Entity–Relationship model
- SQLite
senior
- i̶s̶o̶l̶a̶t̶i̶o̶n̶ l̶e̶v̶e̶l̶s̶ (probably the worst question that could be asked)
- SQL optimization, execution plan
- Common Table Expressions (CTE)
- temporary table
- SQL RANK functions (
ROW_NUMBER(),RANK()) - stored procedures
- triggers
- local transactions vs distributed transactions
- indexes in details
- composite index
- covering index
- filtered index
- why would you use a covering index instead of a composite index? - denormalization. when should be done?
charvsncharcharvsvarchar- DB partition vs sharding
NoSQL Databases
junior
- NoSQL concepts
middle
- SQL vs NoSQL. Advantages/disadvantages of NoSQL Databases over Relational Databases
senior
- BASE
- can review and use NoSQL databases based on a project needs
- has experience with
MongoDb/Elasticsearch/Redisetc
Entity Framework
junior
- what is
DbContext - configuring the DB model. data annotations vs FluentAPI
- EF approaches (Code First, Database First, Model First)
- implement CRUD
- one-to-one, one-to-many, many-to-many relations conventions
- configure relations with FluentAPI
- load data: lazy vs explicit vs eager
IEnumerablevsIQueryable- create and apply a migration
middle
- change tracker,
AsNoTracking() - update/delete data in disconnected scenarios
- owned entities
- shadow property
- backing fields
- value conversions
- global filters. how to implement soft delete in EF?
senior
- inheritance strategies (TPH, TPT, TPC)
- raw SQL queries
- working with stored procedures
- working with views
- transactions, transactions in
SaveChanges(),TransactionScope - interceptors
- unit test code with
DbContext - view generated SQL (
.ToString(), log, profiler) - Hi/Lo
- linqpad
Monitoring
junior
middle
- different log levels (
Trace,Debug,Info,Warning,Error,Fatal) - health checks
senior
- tools how to track events in the cloud (
Grafana,Prometheus, etc). when to use? - diagnostic/health check
- trace identifier/correlation id
- structure log
- audit log
- monitoring on-premises systems (
Grafana, ELK stack,Seq, etc) - tracing requests in a distributed system
Performance
junior
- can find performance issues in the app?
middle
- can optimize algorithms
- can optimize memory usage
senior
- can detect and optimize IO/CPU bound operation
- benchmarking. understand statistics (mean, error, etc)
- SQL optimization, execution plan
- latency vs throughput. How can those be measured?
Cache
junior
middle
IMemoryCachevsIDistibutedCachevsHybridCacheAbsoluteExpirationvsSlidingExpiration- Redis
- memoization
senior
- FusionCache
- two-level cache
- Backplane
- сaching strategies
- Cache-Aside (Lazy loading)
- Read-Through Cache
- Write-Through Cache
- Write-Back
- Write-Around - cache invalidation methods
- manual invalidation
- time-based invalidation (TTL)
- event-based invalidation - cache metrics
- latency
- throughput
- cache hit ratio
- cache miss rate
- cache size
Tests
junior
- alpha testing vs beta testing
- unit tests
- unit test characteristics (quick, consistent, isolated, atomic, independent)
- Mock objects
- Arrange-Act-Assert (AAA) pattern
Assertstatement- TDD. knows when to apply
- unit test naming conventions
middle
- integration tests
- run web service in the integration test
- BDD
- Given-When-Then (GWT) pattern
- FluentAssertion
- Bogus
AssertvsExpectstatement- Stub objects
senior
- testing pyramid
- e2e tests.
playwrightvsselenium - PageObject pattern
- unit test code with
DbContext - performance testing.
NBomber - snapshot tests
- mutation testing.
Stryker.NET - builder pattern in unit tests
- architecture tests
- contract testing.
PactNet
Design patterns
junior
- OOD Principles with examples
- DRY
- KISS
- YAGNI - basic patterns
- singelton
- strategy
- prototype
- etc - specialized patterns
- lazy loading
middle
- antipatterns
- service locator
- singelton
- etc - SOLID
- specialized patterns
- unit of work and repository
- marker interface
senior
- design patterns inside the .NET?
- knows how to use and apply patterns in your work?
- advanced patterns
- visitor
- builder for unit tests
- state
- bridge
- etc - specialized patterns
- specification pattern
- null object (special case pattern)
- object pool - architecture patterns
- MVC vs MVP vs MVVM
- reporting database pattern
Architecture
junior
- breaking a problem into multiple functions
middle
senior
- dependency inversion
- low coupling and high cohesion
- onion architecture
- MVC vs MVP vs MVVM
- screaming architecture
- vertical slice architecture
- multitenant architecture
- modular monolith
- microservices
- Domain Driven Design
- event sourcing
- snapshotting events
- how can an entity be deleted?
- can we delete the event?
- what if the event’s structure changed? - CQRS
- when should it be applied?
- what are the options for the read model?
- why is returning the result from the command considered a bad idea? - state machine
- Architecture Decision Record
- architecture tests
Domain Driven Design
junior
middle
senior
- ubiquitous language
- sub-domain / bounded context
- business invariant
- aggregate root
- value object
- specification pattern
- domain events and integration events
- rich vs anemic model
- validation (always-valid model / not-always-valid-model)
- context map
- relationships between bounded contexts
- Shared Kernel
- Anti-Corruption Layer - persistence ignorance principle
- DDD trilemma (purity / encapsulation / performance)
- aggregates creation (constructor / static method / factory)
- DDD Layers
- Application layer
Microservices
junior
- 🤷♂️
middle
- what are microservices? what is the use case for using them?
- microservice vs monolith
- can one microservice access another microservice’s database?
senior
- correlation id
- strong consistency vs eventual consistency
- synchronous communication (HTTP vs GraphQL vs gRPC)
- asynchronous communication (AMQP)
- what is a proxy server? API gateway? BFF? load balancers?
Ocelot - load balancing strategies (sticky session)
- message brokers. pull vs push models. publish/subscriber
- message queues. dead-letter queues
- transactions management
- transactional Outbox
- state machine, SAGA (orchestration vs choreography)
- compensation events
- two-phase commit - vertical vs horizontal scaling
- which to choose?
- what are the limits? - distributed locks
- distributed cache
- idempotency in microservices
- service aggregator pattern
- queue-based load leveling
- inbox pattern
- outbox pattern
- messaging guarantees
- at most once (uniqueness)
- at least once (delivery)
- exactly once (delivery, uniqueness) - backplane pattern
- circuit-breaker pattern
- retry HTTP calls
- which HTTP status codes should be retried and which shouldn’t?
- how do you avoid a self-inflicted DDoS attack?
- why is exponential backoff preferable over contact timeout?
- what is jitter and why do we need it?
- can you retry every operation? what is idempotency? - ETL
- tracing requests in a distributed system
- contract testing.
PactNet
Cloud computing
junior
- 🤷♂️
middle
- on-premise vs cloud deployment
- benefits and drawbacks of going cloud
- cloud models (PaaS vs IaaS vs SaaS)
senior
- serverless concept
- vertical/horizontal scaling
- cold start problem in lambdas
- blob storage
types of resources (an account, a container, a blob)
access tiers (hot, cool, cold, archive) - vendor lock-in
DevOps
junior
- 🤷♂️
middle
senior
- shell scripts, .ps1 scripts
- CD strategies
- Recreate
- Blue/Green
- A/B
- Canary
- Feature Flag - can configure CI/CD pipeline
- can provision resources with Infrastructure as Code
- understand database migrations based on CD strategy
Containers
junior
- 🤷♂️
middle
- VM vs container
- docker
- dockerfile
- image
- container
- docker CLI
- image pull and push
- run an image in the container
- execute a command in the container - how to access a container from your PC? (expose port)
senior
- docker compose
- Docker Hub
- multi-stage build
- volumes
- how to access an application on your PC from the container? (
network_mode: host)
Software development methodologies
junior
- basics of work organization using ticket management software (i.e., Jira or Trello)
middle
- SCRUM basics: roles, meetings, processes, artifacts
- Kanban basics: Kanban board, tickets processing
- pair programming
- task hierarchy
- epic
- user story
- task
senior
- set-up Scrum or Kanban on the project
- work breakdown structure (WBS)
Estimation
junior
- knows fibonacci numbers
- knows T-shirt sizes
middle
- pocker estimation. What is the etalon story (a reference user story or a baseline story)?
senior
- critical path method
- three-point estimation
- knows when an investigation is required
- include in the estimate
- task estimate
- risk estimate
- tests
- investigation/documentation
Project documentation
junior
- functional specification
- can gather requirements from stakeholders
middle
- understand technical specifications (how to setup/configure project, development process, branch names)
- understand functional specification (sequence diagrams, use-case diagrams, etc)
- release-notes
- when task considered to be completed? acceptance criteria
- UML. different types of diagrams
- Entity–Relationship model
senior
- non-functional specification
- deployment specification
- can write project documentation
- C4 model. Difference between Container and Components
- Architecture Decision Record
- GDPR compliance
For the End
I hope I didn’t upset anyone because the list does not match their expectation 😅. It’s simply my personal perspective, and it’s perfectly fine if you have a different view.
Get iamprovidence’s stories in your inbox
Join Medium for free to get updates from this writer.
Do not worry if you don’t know something, and do not get arrogant if you master a section before somebody else. Remember that everybody learns stuff at a different pace. The labels of junior, mid-level, and senior do not mean anything. As practice shows, what a junior developer has not learned yet, a senior developer has already forgotten 😁.
💬 Let me know in the comment sections what other topics deserve to be on the list
⬇️ Check out my other articles
👏 Don’t forget to clap
☕️ You can buy me a coffee with a link below
✅ Subscribe
🙃 And stay awesome







