void: practical reference
void: practical reference: void states that a method or delegate returns no value.
CKTIS / C#
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
void: practical reference: void states that a method or delegate returns no value.
volatile: practical reference: volatile gives individual field reads and writes appropriate cross-thread visibility.
when: practical reference: when adds a filter to catch or a guard to a switch pattern.
where: practical reference: where filters elements in a query and introduces constraints in a generic declaration.
while: practical reference: while checks its condition before every iteration and may execute its body zero times.
with: practical reference: with creates a nondestructive copy only for a record class, an anonymous type, or a non-void value type, including a struct or tuple.
yield: practical reference: yield return produces the next iterator element, while yield break ends the sequence.
Main: practical reference: Main is the classic C# program entry point; valid signatures return void, int, Task, or Task<int>, optionally accept string[] args, and the compiler selects exactly one entry point.
+: practical reference: The + operator adds numbers, concatenates strings, or invokes a user-defined overload.
+=: practical reference: += computes addition and assigns the converted result back to its left operand.
as: practical reference: as attempts a reference, nullable, boxing, or unboxing conversion and returns null on failure.
=: practical reference: = stores a value in a variable, field, property, indexer, or element and is itself an expression.
await: practical reference: await asynchronously waits for an awaitable and resumes the method after completion.
&: practical reference: & performs bitwise AND on integers or non-short-circuit logical AND on bool values.
&=: practical reference: &= combines bitwise or logical AND with assignment to the left operand.
~: practical reference: ~ flips every bit of an integral operand or invokes a user-defined overload.
|: practical reference: | performs bitwise OR on integers or non-short-circuit logical OR on bool values.
|=: practical reference: |= combines OR with assignment to the left location.
^: practical reference: ^ performs bitwise XOR or Boolean exclusive difference.
^=: practical reference: ^= combines XOR with assignment, toggling the selected bits.
The expression `(T)expression` explicitly converts the result of `expression` to type `T`. It can perform a numeric conversion, reference conversion, unboxing, or a user-defined conversion. Success is not guaranteed: it can lose data or throw an exception.
?:: practical reference: ?: selects exactly one of two expressions according to a bool condition.
--: practical reference: -- decreases a variable by one; prefix yields the new value and postfix the previous value.
/: practical reference: / divides according to operand types; integral division truncates the fraction toward zero.