System.IDisposable: ownership and deterministic cleanup
`System.IDisposable` is the synchronous cleanup contract. Use `using` to choose when cleanup runs, and make it clear who is responsible for it.
CKTIS / C#
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
`System.IDisposable` is the synchronous cleanup contract. Use `using` to choose when cleanup runs, and make it clear who is responsible for it.
Resolve positions from either end of a sequence, validate slice boundaries, and tell when slicing copies elements or returns a view.
Use `INumber<T>` to write one algorithm for multiple numeric types, get the target type’s zero, and convert values with range checking.
Combine lookup flags to select methods by visibility, by whether they are instance or static, and by where they are declared.
Start a real thread, use a monitor to wait for shared state to change, and wait separately for the thread to finish. A notification does not prove that the condition is true.
Build a System.Text.Json converter that reads and writes one JSON object, rejects invalid tokens, and explicitly applies camel-case naming and null omission.
Implement a converter that reads and writes exactly one JSON value, rejects incompatible input, and keeps invariant text formatting separate from JSON encoding.
Environment.ExitCode: practical reference: Environment.ExitCode gets or sets the current process exit code returned to the operating system after normal termination.
abstract: practical reference: abstract marks an incomplete type or member that requires implementation in a derived class.
add: practical reference: add defines a custom event subscription accessor and receives the delegate as value.
alias: practical reference: alias is a contextual keyword only immediately after extern in extern alias; an ordinary using alias places an identifier before = and does not use the alias keyword.
and: practical reference: and combines logical patterns and matches when both patterns are satisfied.
ascending: practical reference: ascending explicitly selects increasing key order in a query orderby clause.
async: practical reference: async enables await; an async method may return void, Task, Task<T>, or a suitable task-like type such as ValueTask/ValueTask<T>, while an async iterator that produces a stream returns IAsyncEnumerable<T>.
base: practical reference: base refers to the implementation or constructor of the current object’s base class.
break: practical reference: break immediately terminates the nearest loop or switch section.
by: practical reference: by separates an element from its key in a query group ... by clause.
case: practical reference: case defines a value or pattern label in a switch statement.
catch: practical reference: catch captures an exception of a compatible type after a failed try.
checked: practical reference: checked enables overflow checking for covered integer operations and conversions.
class: practical reference: class declares a reference object type with single base-class inheritance.
const: practical reference: const declares a compile-time value that is embedded into consuming code.
continue: practical reference: continue skips the rest of the current iteration and proceeds to the next.
default: practical reference: default creates a type’s default value or the default switch label depending on context.