.NET / C#
Enterprise application development concepts covering CLR, LINQ, and Memory Management.
Interview Questions
4 TotalWhat is the Common Language Runtime (CLR)?
The CLR is the execution engine of the .NET framework that manages running code. It provides memory management (Garbage Collection), thread management, exception handling, and security.
Explain the difference between `IEnumerable` and `IQueryable` in LINQ.
`IEnumerable` executes queries in-memory on the client side, while `IQueryable` translates queries into SQL and executes them on the database server side. `IQueryable` is used to filter data BEFORE it reaches the application.
What is a Garbage Collector (GC) in .NET?
The GC automatically manages the allocation and release of memory for an application. Developers don't have to write code to perform memory management tasks, preventing memory leaks.
What are the main differences between a Class and a Struct in C#?
Classes are Reference Types allocated on the Heap. Structs are Value Types typically allocated on the Stack. Structs do not support inheritance like Classes do.