What is garbage collection?
The garbage collector reclaims managed objects that are no longer reachable. It uses generations to optimize collection of short-lived objects.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 1045–1056 of 3610 questions
The garbage collector reclaims managed objects that are no longer reachable. It uses generations to optimize collection of short-lived objects.
IDisposable provides a Dispose method for releasing resources deterministically. Use using or await using to ensure cleanup even when exceptions occur.
A static member belongs to the type rather than a particular instance. Static methods cannot directly access instance members without an object reference.
Generics let types and methods work with parameters representing types, preserving compile-time type safety and reducing casts.
async and await let a method await an asynchronous operation without blocking a thread while that operation is pending. They are especially useful for I/O-
Task represents an asynchronous operation that completes in the future. Task<T> also provides a result of type T.
A delegate is a type-safe reference to a method or compatible callable target. Func, Action, and Predicate are common built-in delegate types.
An event provides a publisher/subscriber pattern around a delegate. Subscribers can react to a notification without the publisher knowing their concrete im
ASP.NET Core is a cross-platform framework for building web apps, REST APIs, real-time apps, and services on .NET. It uses middleware and dependency inject
Middleware components process HTTP requests and responses in sequence. Each component can call the next component or short-circuit the pipeline.
A controller groups HTTP endpoints into action methods. Controllers commonly use attributes such as [ApiController], [Route], and [HttpGet].
A REST-style API exposes resources through URLs and uses HTTP methods and status codes. Statelessness and consistent resource representations are important