Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

Knowledge base — C#

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

Entries: 443

C#

System.Index and System.Range: positions and slices

Resolve positions from either end of a sequence, validate slice boundaries, and tell when slicing copies elements or returns a view.

Advanced · C# 12 and .NET 8; later runtimes may add compatible features
C#

BindingFlags: filtering methods with reflection

Combine lookup flags to select methods by visibility, by whether they are instance or static, and by where they are declared.

Advanced · C# 12 and .NET 8; later runtimes may add compatible features
C#

Environment.ExitCode: practical reference

Environment.ExitCode: practical reference: Environment.ExitCode gets or sets the current process exit code returned to the operating system after normal termination.

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

abstract: practical reference

abstract: practical reference: abstract marks an incomplete type or member that requires implementation in a derived class.

Basic · C# language and .NET 10 reference runtime
C#

add: practical reference

add: practical reference: add defines a custom event subscription accessor and receives the delegate as value.

Basic · C# language and .NET 10 reference runtime
C#

alias: practical reference

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.

Basic · C# language and .NET 10 reference runtime
C#

and: practical reference

and: practical reference: and combines logical patterns and matches when both patterns are satisfied.

Basic · C# language and .NET 10 reference runtime
C#

ascending: practical reference

ascending: practical reference: ascending explicitly selects increasing key order in a query orderby clause.

Basic · C# language and .NET 10 reference runtime
C#

async: practical reference

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

Basic · C# language and .NET 10 reference runtime
C#

base: practical reference

base: practical reference: base refers to the implementation or constructor of the current object’s base class.

Basic · C# language and .NET 10 reference runtime
C#

break: practical reference

break: practical reference: break immediately terminates the nearest loop or switch section.

Basic · C# language and .NET 10 reference runtime
C#

by: practical reference

by: practical reference: by separates an element from its key in a query group ... by clause.

Basic · C# language and .NET 10 reference runtime
C#

case: practical reference

case: practical reference: case defines a value or pattern label in a switch statement.

Basic · C# language and .NET 10 reference runtime
C#

catch: practical reference

catch: practical reference: catch captures an exception of a compatible type after a failed try.

Basic · C# language and .NET 10 reference runtime
C#

checked: practical reference

checked: practical reference: checked enables overflow checking for covered integer operations and conversions.

Basic · C# language and .NET 10 reference runtime
C#

class: practical reference

class: practical reference: class declares a reference object type with single base-class inheritance.

Basic · C# language and .NET 10 reference runtime
C#

const: practical reference

const: practical reference: const declares a compile-time value that is embedded into consuming code.

Basic · C# language and .NET 10 reference runtime
C#

continue: practical reference

continue: practical reference: continue skips the rest of the current iteration and proceeds to the next.

Basic · C# language and .NET 10 reference runtime
C#

default: practical reference

default: practical reference: default creates a type’s default value or the default switch label depending on context.

Basic · C# language and .NET 10 reference runtime