Enumerable.Sum: practical reference
Enumerable.Sum: practical reference: Immediately enumerates and adds values in the overload-specific type; nullable overloads ignore null.
CKTIS / C#
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Enumerable.Sum: practical reference: Immediately enumerates and adds values in the overload-specific type; nullable overloads ignore null.
Enumerable.Take: practical reference: The deferred operation returns at most the first count elements and ends enumeration when the limit is reached.
Enumerable.TakeWhile: practical reference: Returns the initial segment while the predicate is true and stops at the first false.
Enumerable.ThenBy: practical reference: Adds a stable ascending secondary key to an existing IOrderedEnumerable<T>.
Enumerable.ThenByDescending: practical reference: Adds a stable descending secondary key while preserving the priority of earlier keys.
Enumerable.ToArray: practical reference: Immediately enumerates and copies elements into a new fixed-length array.
Enumerable.ToDictionary: practical reference: Immediately enumerates and builds a Dictionary<TKey,TValue> from selected keys and optional selected values.
Enumerable.ToList: practical reference: Immediately enumerates and copies elements into a new mutable List<T>.
Enumerable.ToLookup: practical reference: Immediately builds a read-only index where one key can have multiple values.
Enumerable.Union: practical reference: The deferred result yields unique elements of the first source and then new unique elements of the second under the comparer.
Enumerable.Where: practical reference: The deferred filter returns original elements for which the predicate is true; the indexed overload passes the source index.
Enumerable.Zip: practical reference: The deferred operation combines elements at equal positions and stops when the shortest source is exhausted.
Environment.Exit(int exitCode) terminates the entire process and passes an exit code to the operating system. It is not an ordinary method return: it also stops other threads and skips finally blocks.
System.EventArgs is the base class used in the standard .NET event pattern. A custom derived class carries data to handlers, while EventArgs.Empty is used when raising events without additional data.
System.EventHandler<TEventArgs> defines a delegate for handling events that carry data of a specified type. It connects a publisher with subscribers without requiring a custom delegate type.
ExpandoObject in System.Dynamic lets you add and remove members at run time. It supports access through dynamic and through the IDictionary<string, object?> dictionary interface.
FormattableString.Invariant formats the arguments of an interpolated string using the invariant culture and returns a string. It produces numeric text independent of the current culture while retaining the supplied format specifiers.
HashCode.Combine produces an int hash code from one to eight values. It is useful in GetHashCode for types with field-based equality, but its result is neither a persistent identifier nor proof of equality.
ICustomFormatter.Format lets a format provider control a value's text representation without changing its type. It works with IFormatProvider and methods such as string.Format; an implementation should also handle ordinary formats and null.
System.IFormatProvider supplies information used during formatting and parsing. Its single method, GetFormat, returns an object of the requested type or null when the provider does not support that type.
System.IFormattable defines conversion of a value to text using a format string and a provider of formatting information. It lets custom types participate in composite formatting, such as string.Format, rather than relying only on parameterless ToString().
IMemoryOwner<T> expresses responsibility for a buffer's lifetime. Its Memory property exposes the contents as Memory<T>, while the inherited Dispose ends the owner's use of the resource.
System.IndexOutOfRangeException signals, among other cases, an attempt to read or write an array element using an invalid index. Usually, fix the index calculation or loop bounds rather than using the exception for normal control flow.
System.Index describes a position measured from the start or end of a sequence, while System.Range describes a start-inclusive, end-exclusive interval. The ^ and .. operators simplify element access and slicing; cost and data sharing depend on the sequence type.