What is List<T>?
List<T> is a resizable, strongly typed collection. It supports adding, removing, searching, and indexed access.
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 1033–1044 of 3610 questions
List<T> is a resizable, strongly typed collection. It supports adding, removing, searching, and indexed access.
Dictionary<TKey,TValue> stores values by unique keys and normally provides fast average lookup.
LINQ provides a consistent way to query collections and supported data sources using method syntax or query syntax.
A lambda is an anonymous function written with =>. It is commonly used with delegates, LINQ, and callbacks.
An interface defines a contract that implementing types must satisfy. It enables polymorphism and loose coupling.
Inheritance lets a derived class reuse and specialize a base class. C# supports single class inheritance and multiple interface implementation.
Polymorphism lets code call a common contract while the runtime dispatches to the implementation for the actual object.
Encapsulation keeps internal state and implementation details behind a public contract. It protects invariants by controlling how state changes.
Abstraction exposes essential behavior while hiding implementation details. Interfaces and abstract classes are common tools for defining abstractions.
An abstract class cannot be instantiated directly. It can define shared implementation and abstract members that derived classes must implement.
An exception represents an error or unusual condition. try, catch, finally, and throw are used to handle or propagate exceptions.
Inside a catch block, throw; rethrows the current exception while preserving its original stack trace. throw ex; resets the point from which the stack trac