Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 5788

C#

Enumerable.ToDictionary: practical reference

Enumerable.ToDictionary: practical reference: Immediately enumerates and builds a Dictionary<TKey,TValue> from selected keys and optional selected values.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Enumerable.ToList: practical reference

Enumerable.ToList: practical reference: Immediately enumerates and copies elements into a new mutable List<T>.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Enumerable.ToLookup: practical reference

Enumerable.ToLookup: practical reference: Immediately builds a read-only index where one key can have multiple values.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Enumerable.Union: practical reference

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.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Enumerable.Where: practical reference

Enumerable.Where: practical reference: The deferred filter returns original elements for which the predicate is true; the indexed overload passes the source index.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Enumerable.Zip: practical reference

Enumerable.Zip: practical reference: The deferred operation combines elements at equal positions and stops when the shortest source is exhausted.

Basic · .NET LINQ; verified on .NET 10.0.14
C#

Environment.Exit — terminating a process

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.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

System.EventArgs — event data

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.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

EventHandler<TEventArgs> — events with typed 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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

ExpandoObject — an object with a changeable set of members

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

FormattableString.Invariant — invariant-culture interpolation

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.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

HashCode.Combine — combining values into a hash code

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

ICustomFormatter.Format — custom value formatting

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

IFormatProvider — supplying formatting information

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

IFormattable — formatting values with a format provider

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().

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

IMemoryOwner<T> — ownership of a memory buffer

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

IndexOutOfRangeException — index outside bounds

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.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

System.Index and System.Range — indices and slices

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.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

Int32.Parse — converting text to int

Int32.Parse converts numeric text to int. Learn its default format rules, how culture affects parsing, and which exceptions invalid input produces.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

INumber<T>: generic numeric calculations

INumber<T> lets you write one generic method for different numeric types. Its constraint exposes operators and the inherited T.Zero and T.CreateChecked members, allowing you to initialize an accumulator and convert input values.

Intermediate · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

JsonException — JSON data errors

JsonException from System.Text.Json signals invalid JSON, an exceeded nesting limit, or a value incompatible with the target type. It also exposes diagnostic information that helps locate the problem in the input.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

JsonTokenType — JSON token kind

JsonTokenType is an enumeration in System.Text.Json describing a token recognized by Utf8JsonReader. It distinguishes object and array boundaries, property names, and values. None means the state before reading, not the JSON value null.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

KeyNotFoundException — a missing collection key

System.Collections.Generic.KeyNotFoundException signals an attempt to retrieve an element using a key that does not exist. Learn how Dictionary<TKey,TValue> indexer reads differ from writes and when to use TryGetValue for an expected missing key.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification
C#

KeyValuePair<TKey,TValue> — a key-value pair

KeyValuePair<TKey,TValue> holds one key and one value of specified types. Its Key and Value properties are read-only; you encounter this type, for example, when iterating over Dictionary<TKey,TValue>.

Basic · .NET 10; repository net10.0 and LangVersion=preview; feature versions require per-entry verification