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#

^: practical reference

^: practical reference: ^ creates an Index measured from the end, where ^1 denotes the last element.

Basic · C# language; verified against C# 14 reference
C#

!=: practical reference

!=: practical reference: != negates the equality semantics of the operator defined for the type.

Basic · C# language; verified against C# 14 reference
C#

is: practical reference

is: practical reference: is tests a type or pattern and can bind a narrowed variable; a simple type test returns false, rather than throwing InvalidCastException, for null or a type mismatch.

Basic · C# language; verified against C# 14 reference
C#

=>: practical reference

=>: practical reference: The => operator creates a lambda expression or separates a pattern from its result in a switch expression.

Basic · C# operator reference; verified against C# 14
C#

<<: practical reference

<<: practical reference: << shifts bits left and fills the vacated low positions with zeros.

Basic · C# operator reference; verified against C# 14
C#

<<=: practical reference

<<=: practical reference: <<= shifts the left operand and assigns the converted result back to its type.

Basic · C# operator reference; verified against C# 14
C#

<=: practical reference

<=: practical reference: <= tests whether the left operand is not greater under the type's ordering operator.

Basic · C# operator reference; verified against C# 14
C#

<: practical reference

<: practical reference: < tests whether the left operand strictly precedes the right operand.

Basic · C# operator reference; verified against C# 14
C#

&&: practical reference

&&: practical reference: && returns true only for two true operands and skips the right side after a false left side.

Basic · C# operator reference; verified against C# 14
C#

!: practical reference

!: practical reference: ! negates a bool or calls an overloaded operator; postfix ! separately means null-forgiving.

Basic · C# operator reference; verified against C# 14
C#

||: practical reference

||: practical reference: || returns true after the first true operand and skips the right side.

Basic · C# operator reference; verified against C# 14
C#

Member access: the dot operator (.)

The dot selects a member of an object or type and forms qualified names. Learn the difference between property access, method invocation, and conditional access when a receiver is null.

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

*: practical reference

*: practical reference: * multiplies numbers, dereferences a pointer in unary unsafe use, or invokes an overload.

Basic · C# operator reference; verified against C# 14
C#

*=: practical reference

*=: practical reference: *= multiplies and assigns under compound-assignment conversion rules.

Basic · C# operator reference; verified against C# 14
C#

nameof: practical reference

nameof: practical reference: nameof produces a symbol's name as a compile-time string without evaluating the symbol.

Basic · C# operator reference; verified against C# 14
C#

??: practical reference

??: practical reference: ?? returns its left operand when non-null and otherwise lazily evaluates the right operand.

Basic · C# operator reference; verified against C# 14
C#

??=: practical reference

??=: practical reference: ??= assigns the right value only when the left location is null.

Basic · C# operator reference; verified against C# 14
C#

?.: practical reference

?.: practical reference: ?. and ?[] stop a continuous access chain at null and return null.

Basic · C# operator reference; verified against C# 14
C#

!: practical reference

!: practical reference: Postfix ! suppresses a nullable-analysis warning without changing the runtime value.

Basic · C# operator reference; verified against C# 14
C#

..: practical reference

..: practical reference: .. creates a Range from optional Index bounds for slicing a supported type.

Basic · C# operator reference; verified against C# 14
C#

%: practical reference

%: practical reference: % returns the remainder after division; for signed values its sign follows the left operand.

Basic · C# operator reference; verified against C# 14
C#

%=: practical reference

%=: practical reference: %= computes a remainder and assigns it to the left operand.

Basic · C# operator reference; verified against C# 14
C#

>>: practical reference

>>: practical reference: >> shifts bits right; for signed operands it performs an arithmetic shift that propagates the sign bit.

Basic · C# operator reference; verified against C# 14
C#

>>=: practical reference

>>=: practical reference: >>= shifts right and assigns the result to the left location.

Basic · C# operator reference; verified against C# 14