We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook and Instagram work. They are set only if you accept. See our Privacy Policy for details.
Practice C# questions covering .NET framework, LINQ, async/await, generics, delegates, and enterprise application patterns.
Answer a real C# interview question before you browse the list. No signup needed.
Which flag is NOT included when strict: true is set in tsconfig?
Practice in a session
10 questions from C#, one after another, then your score and streak.
Core topics include OOP principles in C#, LINQ, async/await patterns, generics, delegates and events, exception handling, interfaces vs abstract classes, and dependency injection. Framework-specific topics include Entity Framework, ASP.NET Core, and the .NET runtime (GC, JIT).
Absolutely. C# powers enterprise applications, game development (Unity), cloud services (Azure), and cross-platform apps (.NET MAUI). Microsoft's continued investment in .NET and C# keeps it among the top programming languages. It's especially dominant in enterprise and game development.
async marks a method as asynchronous. await pauses execution until the Task completes without blocking the thread. The compiler transforms async methods into state machines. Use async/await for I/O-bound operations (HTTP calls, database queries, file operations) to keep applications responsive.
Language Integrated Query provides SQL-like syntax for querying collections, databases, and XML in C#. It supports method syntax (collection.Where().Select()) and query syntax (from x in collection where...). LINQ improves readability and reduces boilerplate for data manipulation.
Delegates are type-safe function pointers that reference methods. Events are a pattern built on delegates for publish-subscribe communication. Action<T> and Func<T> are built-in delegate types. Events are used extensively in UI frameworks, game development, and event-driven architectures.
The .NET GC uses generational collection (Gen 0, 1, 2) based on object lifetime. Short-lived objects are collected quickly in Gen 0. Long-lived objects promote to higher generations. The Large Object Heap handles objects over 85KB. Understanding GC helps with performance optimization and avoiding memory pressure.