InterviewTreedInterviewTreed
All learning paths

Programming & Frameworks

C# & .NET Development

Prepare for C# and .NET interviews, covering object-oriented programming, advanced C#, .NET internals, ASP.NET Core, Web APIs, Entity Framework Core, SQL integration, design patterns, testing, and application architecture.

Your learning roadmap

Explore the key concepts

Use these subtopics as a study checklist. Start with the fundamentals, then progress to practical examples and interview preparation.

C# fundamentals

C# fundamentals: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

C# data types and variables

C# data types and variables: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Value types and reference types

Compare value types and reference types in C#, including assignment behavior, memory allocation, copying, object references, and parameter passing.

Start learning

Boxing and unboxing

Understand boxing and unboxing conversions between value types and object or interface references, including performance implications and common pitfalls.

Start learning

Type conversion and type casting

Learn implicit and explicit conversions, casting operators, Convert methods, parsing, TryParse, and safe handling of incompatible data types.

Start learning

Operators and expressions

Explore arithmetic, relational, logical, bitwise, assignment, null-coalescing, and conditional operators and understand expression evaluation in C#.

Start learning

Conditional statements and loops

Use if, else, switch, for, foreach, while, and do-while constructs to implement decisions, repetition, and program flow control.

Start learning

Methods and parameter passing

Define reusable C# methods, specify parameters and return types, overload methods, and understand how arguments are passed during method calls.

Start learning

Value, ref, out, and in parameters

Compare value, ref, out, and in parameter modifiers and understand how each affects variable passing, assignment, and method interaction.

Start learning

Optional and named arguments

Use optional parameters and named arguments to make method calls more flexible, readable, and backward-compatible.

Start learning

Classes and objects

Define classes, create object instances, initialize fields and properties, and understand how objects encapsulate application state and behavior.

Start learning

Constructors and destructors

Understand instance, parameterized, static, and private constructors, constructor chaining, and the role and limitations of finalizers.

Start learning

Properties and indexers

Create properties using getters, setters, and init accessors, and implement indexers to access class instances using array-like syntax.

Start learning

Fields and methods

Understand fields and methods as class members, including instance and static members, access patterns, and their role in encapsulating behavior.

Start learning

Access modifiers

Control visibility and accessibility of C# types and members using public, private, protected, internal, protected internal, and private protected.

Start learning

Static classes and members

Understand static classes, fields, methods, constructors, and properties, and learn when shared members are appropriate in application design.

Start learning

Object-oriented programming principles

Explore the four pillars of object-oriented programming in C# and understand how they support reusable, extensible, and maintainable software.

Start learning

Encapsulation

Apply encapsulation by controlling access to object state, exposing meaningful operations, and protecting class invariants through properties and methods.

Start learning

Inheritance

Build class hierarchies using inheritance, reuse base-class functionality, extend derived classes, and understand constructor behavior across inheritance chains.

Start learning

Polymorphism

Implement polymorphism through inheritance, interfaces, and virtual methods to allow different object types to respond to common operations.

Start learning

Abstraction

Use abstraction to expose essential functionality while hiding implementation details and reducing dependencies between application components.

Start learning

Interfaces and abstract classes

Compare interfaces and abstract classes, define contracts, share common implementation, and choose suitable abstractions for application architecture.

Start learning

Method overloading and overriding

Understand compile-time method overloading and runtime method overriding, including signature rules and their role in polymorphic behavior.

Start learning

Virtual, override, and new keywords

Explore virtual, override, and new keywords and understand how method dispatch, inheritance, and member hiding work in C#.

Start learning

Sealed classes and methods

Use sealed classes and sealed overrides to prevent further inheritance or method overriding and control extension points in class hierarchies.

Start learning

Structs and records

Understand structs and records, compare value-oriented and reference-oriented data models, and use record types for immutable data representation.

Start learning

Enums

Define named constants using enums, work with underlying numeric values, flags, conversions, and improve readability of fixed-choice data.

Start learning

Generics and generic constraints

Create reusable type-safe classes, methods, and interfaces using generics, and apply constraints to control permitted type arguments.

Start learning

Collections and collection interfaces

Explore collection interfaces such as IEnumerable, ICollection, IList, and IDictionary and understand how they define common collection behavior.

Start learning

List, Dictionary, HashSet, and Queue

Use List, Dictionary, HashSet, and Queue to store and retrieve data efficiently, and understand their operations and appropriate use cases.

Start learning

IEnumerable and IQueryable

Compare IEnumerable and IQueryable, understand in-memory versus provider-based query execution, and learn how deferred queries are evaluated.

Start learning

Array and collection operations

Perform common array and collection operations such as searching, sorting, filtering, enumeration, copying, insertion, and removal.

Start learning

Delegates

Understand delegates as type-safe references to methods and use built-in delegate types such as Action, Func, and Predicate.

Start learning

Events and event handling

Implement event-driven communication using C# events, event handlers, EventHandler delegates, and publisher-subscriber patterns.

Start learning

Anonymous methods and lambda expressions

Create inline methods using anonymous methods and lambda expressions and understand expression syntax, closures, and delegate conversion.

Start learning

Expression trees

Understand expression trees as representations of executable code and learn how to construct, inspect, and use them in query providers and dynamic processing.

Start learning

LINQ fundamentals

Learn Language Integrated Query fundamentals, including query syntax, method syntax, filtering, projection, grouping, ordering, and aggregation.

Start learning

LINQ to Objects

Use LINQ to Objects to query in-memory collections with operators such as Where, Select, GroupBy, Join, and Aggregate.

Start learning

LINQ to SQL and Entity Framework

Understand provider-based LINQ queries and how LINQ expressions are translated into database queries through SQL-oriented providers and Entity Framework.

Start learning

Deferred and immediate execution

Compare deferred and immediate LINQ execution, understand query evaluation timing, and identify when operators execute or materialize results.

Start learning

Extension methods

Create and use extension methods to add reusable functionality to existing types without modifying their original implementation.

Start learning

Nullable reference types

Use nullable reference types and compiler annotations to identify potential null values, reduce null-reference exceptions, and improve type safety.

Start learning

Exception handling

Handle application errors using try, catch, finally, and throw, and understand exception propagation, filters, and built-in exception types.

Start learning

Custom exceptions

Create domain-specific exception classes, define meaningful error messages, and design consistent exception-handling strategies for applications.

Start learning

Garbage collection

Understand .NET garbage collection, object lifetime, managed heap allocation, memory reclamation, and how GC affects application performance.

Start learning

Managed and unmanaged memory

Compare managed and unmanaged memory, understand CLR-managed objects and native resources, and learn how applications interact with external memory.

Start learning

IDisposable and the using statement

Implement IDisposable and use using statements and declarations to release unmanaged resources and deterministic resource ownership.

Start learning

Memory management and resource disposal

Manage application memory and external resources through disposal patterns, object lifetime management, finalization, and safe cleanup practices.

Start learning

Reflection and attributes

Inspect assemblies, types, methods, and properties at runtime using reflection, and use attributes to attach metadata to program elements.

Start learning

Dependency injection fundamentals

Understand dependency injection and inversion of control, register services, resolve dependencies, and reduce coupling between application components.

Start learning

Asynchronous programming

Explore asynchronous programming in C# and understand non-blocking operations, task-based execution, and responsive application design.

Start learning

Task and Task<T>

Task and Task<T>: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

async and await

Use async and await to write asynchronous C# code, understand compiler-generated state machines, and handle asynchronous results and exceptions.

Start learning

Task.WhenAll and Task.WhenAny

Task.WhenAll and Task.WhenAny: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

CancellationToken

Implement cooperative cancellation using CancellationToken and CancellationTokenSource to stop asynchronous operations safely and responsively.

Start learning

Parallel programming

Use parallel programming techniques and the Task Parallel Library to execute independent workloads across multiple processor cores.

Start learning

Threading and synchronization

Create and coordinate threads using synchronization mechanisms such as locks, Monitor, SemaphoreSlim, Mutex, and concurrent collections.

Start learning

C# memory model and concurrency

C# memory model and concurrency: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Modern C# language features

Modern C# language features: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

.NET fundamentals

Understand the .NET platform, its runtime, libraries, application models, SDK, and development tools used to build and execute applications.

Start learning

.NET Framework vs .NET Core vs modern .NET

Compare .NET Framework, .NET Core, and modern .NET in terms of runtime architecture, cross-platform support, deployment, compatibility, and application development.

Start learning

.NET architecture

Explore .NET architecture, including the runtime, base class libraries, SDK, compilers, assemblies, and application execution lifecycle.

Start learning

Common Language Runtime (CLR)

Understand the Common Language Runtime and its responsibilities for managed execution, memory management, exception handling, and runtime services.

Start learning

Common Type System (CTS)

Learn how the Common Type System defines data types and programming constructs so components written in different .NET languages can interoperate.

Start learning

Common Language Specification (CLS)

Understand the Common Language Specification and how its rules support interoperability between different programming languages targeting .NET.

Start learning

Intermediate Language (IL)

Explore Intermediate Language generated by .NET compilers and understand how assemblies contain IL that the runtime executes through JIT compilation.

Start learning

Just-In-Time (JIT) compilation

Understand Just-In-Time compilation and how the .NET runtime converts intermediate language into native machine instructions during execution.

Start learning

Assembly loading and metadata

Learn how .NET assemblies are loaded and how metadata describes types, methods, references, and other information used by the runtime.

Start learning

Garbage collection generations

Understand .NET garbage collection generations 0, 1, and 2, large object heap behavior, collection frequency, and memory allocation patterns.

Start learning

ASP.NET Core fundamentals

ASP.NET Core fundamentals: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

ASP.NET Core application architecture

ASP.NET Core application architecture: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Middleware and request pipeline

Understand ASP.NET Core middleware and how HTTP requests and responses flow through the pipeline, including ordering, branching, and short-circuiting.

Start learning

Built-in dependency injection

Use the built-in ASP.NET Core dependency injection container to register services, resolve dependencies, and manage application components.

Start learning

Service lifetimes: Transient, Scoped, Singleton

Compare transient, scoped, and singleton service lifetimes and understand object creation, disposal, request scope, and lifetime-related dependency issues.

Start learning

Configuration and appsettings

Configure ASP.NET Core applications using appsettings.json, environment-specific settings, environment variables, command-line arguments, and configuration providers.

Start learning

Options pattern

Use the Options pattern to bind configuration sections to strongly typed classes and manage application settings through IOptions and related interfaces.

Start learning

Logging and monitoring

Implement structured logging and application monitoring in .NET using ILogger, logging providers, log levels, scopes, and telemetry integrations.

Start learning

Routing and endpoint routing

Configure ASP.NET Core routing and endpoint routing using route templates, constraints, route parameters, and endpoint metadata.

Start learning

Model binding

Understand model binding in ASP.NET Core and how request data from routes, query strings, forms, and bodies is mapped to action parameters.

Start learning

Model validation

Validate incoming application data using data annotations, validation attributes, model state, custom validators, and automatic API validation behavior.

Start learning

Filters and action filters

Use ASP.NET Core filters to execute reusable logic around authorization, resource handling, action execution, exceptions, and result processing.

Start learning

Exception handling middleware

Centralize application error handling with ASP.NET Core exception middleware and return consistent error responses using Problem Details.

Start learning

ASP.NET Core MVC

ASP.NET Core MVC: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Controllers and action methods

Build MVC and API controllers, define action methods, bind request data, return action results, and organize application endpoints.

Start learning

Razor views and Razor Pages

Create server-rendered web interfaces using Razor views and Razor Pages, including layouts, partial views, page handlers, and Razor syntax.

Start learning

Minimal APIs

Build lightweight HTTP endpoints with ASP.NET Core Minimal APIs and understand route handlers, dependency injection, validation, and endpoint configuration.

Start learning

REST Web API fundamentals

Understand RESTful Web API architecture and build HTTP-based services that expose resources through consistent endpoints and representations.

Start learning

HTTP methods and status codes

Understand HTTP methods such as GET, POST, PUT, PATCH, and DELETE and use appropriate HTTP status codes to communicate API outcomes.

Start learning

REST API design principles

Design consistent REST APIs using resource-oriented URLs, appropriate HTTP semantics, stateless communication, pagination, filtering, and error conventions.

Start learning

API versioning

Manage API evolution using URL, query string, and header-based versioning strategies while maintaining compatibility between API clients.

Start learning

Request and response formatting

Configure API request and response serialization, content types, JSON formatting, custom formatters, and consistent response structures.

Start learning

Content negotiation

Understand HTTP content negotiation and how ASP.NET Core selects response formats based on Accept headers and supported media types.

Start learning

Swagger and OpenAPI

Document ASP.NET Core APIs using OpenAPI and Swagger tooling, describe endpoints and schemas, and provide interactive API documentation.

Start learning

API authentication and authorization

Secure Web APIs by implementing authentication and authorization policies, validating identities, and controlling access to protected endpoints.

Start learning

JWT authentication

Implement JWT bearer authentication, understand token claims and signatures, validate access tokens, and configure token-based API security.

Start learning

OAuth 2.0 and OpenID Connect

OAuth 2.0 and OpenID Connect: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Role-based authorization

Restrict access to application functionality using role-based authorization, role claims, authorization attributes, and policy configuration.

Start learning

CORS and CSRF

Understand Cross-Origin Resource Sharing and Cross-Site Request Forgery and configure browser-facing applications to handle cross-origin and request security.

Start learning

Rate limiting and API security

Protect APIs using rate limiting, request validation, secure headers, input controls, authentication policies, and defenses against common web threats.

Start learning

Entity Framework Core fundamentals

Learn Entity Framework Core as an object-relational mapper and understand DbContext, entities, LINQ queries, database providers, and persistence workflows.

Start learning

DbContext and DbSet

Understand DbContext as the database session and DbSet as an entity collection, including change tracking, querying, saving, and lifetime management.

Start learning

Code-first and database-first approaches

Compare code-first and database-first development in EF Core and understand how entity models and existing database schemas are maintained.

Start learning

Migrations and schema management

Manage database schema changes with EF Core migrations, including migration creation, application, rollback, and deployment considerations.

Start learning

Entity relationships

Configure relationships between EF Core entities using navigation properties, foreign keys, and relationship mapping conventions or Fluent API.

Start learning

One-to-one, one-to-many, and many-to-many relationships

Implement one-to-one, one-to-many, and many-to-many database relationships in EF Core and understand their mapping and navigation behavior.

Start learning

Eager, lazy, and explicit loading

Compare eager, lazy, and explicit loading in EF Core and understand how related entities are retrieved and how loading choices affect performance.

Start learning

Tracking and no-tracking queries

Understand EF Core change tracking and use AsNoTracking and related query options to optimize read-only data access scenarios.

Start learning

LINQ queries with EF Core

Write LINQ queries against EF Core entities and understand query translation, filtering, projection, joins, grouping, and database execution.

Start learning

Transactions in EF Core

Manage database transactions in EF Core using automatic SaveChanges transactions, explicit transactions, and transaction coordination.

Start learning

Concurrency handling

Handle concurrent database updates using optimistic concurrency tokens, concurrency exceptions, conflict resolution, and retry strategies.

Start learning

EF Core performance optimization

Improve EF Core performance through efficient LINQ queries, projections, indexing, batching, compiled queries, connection management, and query analysis.

Start learning

ADO.NET fundamentals

Understand ADO.NET as a data access technology and learn how .NET applications connect to databases, execute commands, and retrieve data.

Start learning

Connection and command objects

Use ADO.NET connection and command objects to establish database connections, execute SQL statements, configure parameters, and manage resources.

Start learning

DataReader and DataAdapter

Compare DataReader and DataAdapter for database access and understand forward-only reading, disconnected data, and DataSet population.

Start learning

Parameterized queries

Write parameterized SQL queries in ADO.NET to pass values safely, improve query handling, and protect applications against SQL injection.

Start learning

Stored procedures with ADO.NET

Execute SQL Server stored procedures using ADO.NET commands, configure input and output parameters, and process returned results.

Start learning

SQL Server integration

Integrate .NET applications with Microsoft SQL Server using connection strings, SQL client libraries, queries, stored procedures, and database operations.

Start learning

Database transactions and isolation levels

Understand database transaction properties and isolation levels, and learn how locking, consistency, and concurrency affect SQL Server operations.

Start learning

Repository pattern

Implement the Repository pattern to separate data access logic from business logic and provide a consistent abstraction over persistence operations.

Start learning

Unit of Work pattern

Use the Unit of Work pattern to coordinate multiple repository operations and manage related database changes within a single transaction.

Start learning

Design patterns in C#

Design patterns in C#: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Singleton and Factory patterns

Implement the Singleton pattern for controlled instance creation and Factory patterns for encapsulating object creation and construction decisions.

Start learning

Strategy and Observer patterns

Use the Strategy pattern to exchange algorithms and the Observer pattern to notify dependent objects when application state changes.

Start learning

Decorator and Adapter patterns

Apply the Decorator pattern to extend behavior dynamically and the Adapter pattern to connect incompatible interfaces.

Start learning

SOLID principles

Apply the Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles to improve software design.

Start learning

Clean Code principles

Write maintainable C# code through meaningful naming, small methods, clear responsibilities, consistent formatting, and reduced duplication.

Start learning

Clean Architecture

Structure .NET applications using Clean Architecture principles, separating domain logic, application use cases, infrastructure, and presentation layers.

Start learning

Layered architecture

Organize applications into presentation, business, and data access layers and understand dependency direction, separation of concerns, and layer responsibilities.

Start learning

Microservices with .NET

Build distributed applications using .NET microservices and explore service boundaries, API communication, messaging, independent deployment, and resilience.

Start learning

Background services and hosted services

Run long-lived background tasks in ASP.NET Core using IHostedService and BackgroundService, including scheduling, cancellation, and graceful shutdown.

Start learning

Caching in ASP.NET Core

Caching in ASP.NET Core: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Distributed caching with Redis

Integrate Redis as a distributed cache in .NET applications and understand serialization, expiration, cache consistency, and shared data across instances.

Start learning

SignalR and real-time applications

Build real-time applications with ASP.NET Core SignalR using hubs, client connections, groups, broadcasting, and persistent communication.

Start learning

File uploads and downloads

Implement secure file uploads and downloads in ASP.NET Core using multipart requests, streaming, file validation, storage, and response handling.

Start learning

Unit testing with xUnit

Write automated unit tests for .NET applications using xUnit, organize test cases, use assertions, and apply test fixtures and theories.

Start learning

Mocking with Moq

Isolate dependencies in unit tests using Moq and configure mock behavior, setups, callbacks, and verifications for application services.

Start learning

Integration testing in ASP.NET Core

Integration testing in ASP.NET Core: Learn its key concepts, practical implementation, architecture, and interview considerations.

Start learning

Test-driven development

Apply Test-Driven Development by writing failing tests first, implementing minimal functionality, and refactoring code through repeated test cycles.

Start learning

API testing

Test Web APIs by validating endpoints, request payloads, response codes, authentication, error handling, and integration behavior using automated tools.

Start learning

Application performance optimization

Optimize .NET application performance through efficient algorithms, asynchronous I/O, caching, database tuning, resource management, and profiling.

Start learning

Memory and CPU profiling

Analyze .NET CPU and memory usage with profiling tools to identify bottlenecks, excessive allocations, garbage collection pressure, and performance issues.

Start learning

Secure coding practices in .NET

Apply secure .NET coding practices covering input validation, authentication, authorization, secrets management, encryption, dependency security, and vulnerability prevention.

Start learning

Dockerizing .NET applications

Containerize .NET applications using Docker, create efficient Dockerfiles, configure multi-stage builds, manage environment settings, and run containers.

Start learning

Deploying .NET applications

Deploy .NET applications to hosting environments and cloud platforms, configure runtime settings, manage secrets, and verify production readiness.

Start learning

CI/CD for .NET applications

Automate .NET application builds, testing, packaging, and deployment using CI/CD pipelines with tools such as GitHub Actions and Azure DevOps.

Start learning

Practice & revise

Interview questions

Practice interview questions with answers, key points, and practical examples.

Test your knowledge

Explore 150 questions for this topic, covering concepts, practical examples, and interview scenarios.

Browse 150 questions

Keep learning step by step

Work through the concepts, practice explaining them in your own words, and use interview questions to check your understanding.

Explore another learning path