System.Linq Namespace

Provides classes and interfaces that support LINQ (Language-Integrated Query), which adds querying capabilities to .NET languages. These capabilities are primarily used for querying collections of objects, XML documents, databases, and other data sources.

Classes

Class

Enumerable

Represents a queryable collection of elements of a specified type. This is the primary entry point for LINQ to Objects queries.

View details
public static class Enumerable
Class

Queryable

Provides static methods that support the creation and execution of IQueryable<T> objects. This is the primary entry point for LINQ to providers such as LINQ to SQL or LINQ to Entities.

View details
public static class Queryable

Interfaces

Interface

IEnumerable<T>

Supports iteration over a non-generic collection of objects. It is the base interface for all LINQ queries.

View details
public interface IEnumerable<out T> : IEnumerable
Interface

IQueryable<T>

Represents a query that can be executed. It is the base interface for LINQ providers.

View details
public interface IQueryable<out T> : IEnumerable<T>, IQueryable
Interface

IGrouping<TKey, TElement>

Represents a group of elements that have a common key. Used in group by operations.

View details
public interface IGrouping<out TKey, out TElement> : IEnumerable<TElement>

Extension Methods (from Enumerable)

Extension Method

Where<TSource>

Filters a sequence of values based on a predicate.

View details
public static IEnumerable<TSource> Where<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
Extension Method

Select<TSource, TResult>

Projects each element of a sequence into a new form.

View details
public static IEnumerable<TResult> Select<TSource, TResult>(this IEnumerable<TSource> source, Func<TSource, TResult> selector)
Extension Method

OrderBy<TSource, TKey>

Sorts the elements of a sequence in ascending order according to a key.

View details
public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
Extension Method

GroupBy<TSource, TKey>

Groups the elements of a sequence based on a specified key selector function.

View details
public static IEnumerable<IGrouping<TKey, TSource>> GroupBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)