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#

sizeof: practical reference

sizeof: practical reference: sizeof returns a type's size in bytes; in safe context it is permitted only for a built-in unmanaged type with platform-independent size or an enum.

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

-: practical reference

-: practical reference: - subtracts numbers, negates a unary operand, or computes differences for supported time types.

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

-=: practical reference

-=: practical reference: -= subtracts and assigns; for an event it unsubscribes a delegate.

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

typeof: practical reference

typeof: practical reference: typeof returns a Type object for a compile-time-known type without constructing an instance.

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

Unary plus (+x)

The +x operator returns its operand's numeric value without changing its sign. It neither increments a variable nor computes an absolute value. For small integral types, the result has type int.

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

>>>: practical reference

>>>: practical reference: >>> shifts right logically and always fills with zeros.

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

>>>=: practical reference

>>>=: practical reference: >>>= performs a logical right shift and assigns the result.

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

Nullable reference types and the #nullable context

The string and string? annotations express intent about null, while compiler flow analysis warns about unsafe use. The #nullable context controls annotations and warnings independently; it does not add runtime checks.

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

String interpolation

String interpolation inserts expression results directly into text using $"..." syntax. It supports value formatting, alignment, and literal braces; choose a culture explicitly when numeric formatting must be predictable.

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

bool: practical reference

bool: practical reference: bool is the System.Boolean alias with true and false values.

Basic · C# built-in type reference; .NET 10 runtime
C#

byte: practical reference

byte: practical reference: byte is an 8-bit unsigned integer ranging from 0 through 255.

Basic · C# built-in type reference; .NET 10 runtime
C#

char: practical reference

char: practical reference: char is a 16-bit UTF-16 code unit, not a complete Unicode character.

Basic · C# built-in type reference; .NET 10 runtime
C#

decimal: practical reference

decimal: practical reference: decimal is a 128-bit base-10 numeric type with high decimal precision.

Basic · C# built-in type reference; .NET 10 runtime
C#

double: practical reference

double: practical reference: double is a 64-bit IEEE 754 binary floating-point type.

Basic · C# built-in type reference; .NET 10 runtime
C#

dynamic — binding operations at runtime

The dynamic type defers operation binding until runtime. It simplifies interaction with dynamic APIs, but missing members or incompatible arguments can cause RuntimeBinderException instead of a compilation error.

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

float: practical reference

float: practical reference: float is a 32-bit IEEE 754 binary floating-point type with about seven decimal digits of precision.

Basic · C# built-in type reference; .NET 10 runtime
C#

int: practical reference

int: practical reference: int is the alias for the 32-bit signed System.Int32.

Basic · C# built-in type reference; .NET 10 runtime
C#

long: practical reference

long: practical reference: long is the 64-bit signed System.Int64 type.

Basic · C# built-in type reference; .NET 10 runtime
C#

nint: practical reference

nint: practical reference: nint is a signed integer whose width matches the native pointer size.

Basic · C# built-in type reference; .NET 10 runtime
C#

nuint: practical reference

nuint: practical reference: nuint is an unsigned integer whose width matches the native pointer size.

Basic · C# built-in type reference; .NET 10 runtime
C#

object — the common base type

The object keyword is an alias for System.Object. It can hold references to objects of different types and boxed values. Learn how equality, reference identity, and hash codes differ, and how to recover a more specific type safely.

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

sbyte: practical reference

sbyte: practical reference: sbyte is an 8-bit signed integer ranging from -128 through 127.

Basic · C# built-in type reference; .NET 10 runtime
C#

short: practical reference

short: practical reference: short is the 16-bit signed System.Int16 type.

Basic · C# built-in type reference; .NET 10 runtime
C#

string: practical reference

string: practical reference: string is the alias for immutable System.String storage encoded as UTF-16 code units.

Basic · C# built-in type reference; .NET 10 runtime