C# glossary

245 C# terms, from Novice to Master. Start with the basics or jump to a level.

Updated

Novice

.NET
A development platform containing runtimes, libraries, and tools for building many kinds of applications.
.NET SDK
The tools needed to create, build, test, and publish .NET projects.
Arithmetic Operators
Symbols such as +, -, *, /, and % that perform calculations.
Assignment
Storing a value in a variable with the = operator.
Build
The process that compiles a project and prepares its output files.
C#
A modern programming language for building applications on .NET.
char
A primitive type that stores one UTF-16 code unit.
Class
A blueprint that describes the data and behavior of objects.
Comment
Text for people reading the code that the compiler ignores.
Common Language Runtime (CLR)
The .NET runtime that loads managed code, compiles it for the current computer, and manages its execution.
Comparison Operators
Operators that compare two values and produce true or false.
Compilation
The step that checks C# source code and converts it into an assembly.
Compile Error
A problem that prevents C# source code from being compiled.
Compiler
A tool that checks C# source code and converts it into Common Intermediate Language.
Console.WriteLine()
A method that prints a value followed by a new line.
Curly Braces
The { and } characters that surround a class, method, or other block.
Data Type
A rule describing what kind of value something can hold and what operations it supports.
decimal
A value type for high-precision decimal arithmetic, commonly used with money.
Declaration
A statement that introduces a variable, method, class, or other named item.
dotnet CLI
The command-line tool used to create, build, run, test, and publish .NET projects.
double
A primitive type for numbers that can include a fractional part.
if Statement
A statement that runs code only when its condition is true.
If Statement
A statement that evaluates a condition before executing some code.
If-Else Multiple Conditions
A statement that evaluates multiple conditions until it finds a passing one.
If-Else Statement
A statement that executes one of two code blocks depending on a condition.
Increment Operator
The ++ operator, which adds one to a numeric variable.
Initialization
Giving a variable its first value when it is created.
int
A primitive type for whole numbers within a fixed range.
Literal
A value written directly in source code, such as 42, true, or \"hello\".
Logical Operators
Operators that combine or reverse boolean conditions.
Main Method
The traditional starting method of a C# application.
Method
A named block of code that performs an action and can return a value.
Moq
A C# library used in unit testing to create fake objects.
Project File (.csproj)
An XML file describing a C# project's settings, target framework, files, and dependencies.
Reference Type
A type whose variable stores a reference to an object, such as a class, array, or string.
Runtime Error
A problem that occurs while a compiled program is running.
Semicolon
The punctuation mark that ends most C# statements.
Source File (.cs)
A text file containing C# code for the compiler to read.
string
An object that stores an unchangeable sequence of characters.
switch Expression
An expression that selects and returns a value by matching an input against patterns.
Top-Level Statements
A feature that allows a small C# program to omit an explicit Program class and Main method.
Type Casting
Explicitly converting a value to another compatible type.
Type Conversion
Changing a value from one data type to another compatible type.
Value Type
A type whose value is stored directly, including structs, enums, and built-in numeric types.
Variable
A named place that stores a value a program can use or change.

Apprentice

ADO.NET
ADO.NET is the underlying data access framework for C#.
Array
A fixed-size, indexed collection whose elements all have the same type.
Array Index
A zero-based number that identifies an element's position in an array.
Array Initializer
A brace-enclosed list of values used to fill an array when it is created.
Array Length
The fixed number of elements an array can hold.
break
A statement that immediately exits the nearest loop or switch.
C# Naming Conventions
Common capitalization patterns that make C# names consistent and recognizable.
camelCase
A naming style that starts lowercase and capitalizes each later word.
Console.ReadLine()
A method that reads one line of text from standard input.
const
A modifier for a compile-time constant whose value is fixed in its declaration.
Constant
A named value intended not to change after initialization.
continue
A statement that skips the rest of the current loop repetition.
Division
2 - Integer division discards the remainder.
do-while Loop
A loop that runs its body once before checking whether to repeat.
else if Statement
An additional condition tested when earlier if conditions were false.
enum
A type that defines a fixed set of named constants.
Enumeration Member
One of the named values declared inside an enum.
Escape Sequence
A backslash code that represents a special character inside a string or character literal.
Field
A variable declared in a class and stored with an object or the class itself.
for Loop
A loop that keeps its setup, condition, and update together.
foreach Loop
A loop that visits each item in a collection or sequence.
Fully Qualified Name
A type's complete name including its package.
Implicitly Typed Variable
A local variable declared with var whose type is determined at compile time.
Infinite Loop
A loop whose stopping condition never becomes false.
Jagged Array
An array whose elements are arrays that may have different lengths.
Local Variable
A variable declared inside a method or block and usable only there.
Loop Counter
A numeric variable used to track loop repetitions or positions.
Math Class
A standard class containing constants and static mathematical methods.
Method Argument
A value supplied to a parameter when a method is called.
Method Overloading
Defining methods with the same name but different parameter lists.
Method Parameter
A named input declared by a method.
Multidimensional Array
An array whose elements are themselves arrays.
Named Argument
An argument supplied with its parameter name for clarity or reordered calls.
Namespace
A named container that organizes related types and prevents naming conflicts.
Nested Loop
A loop placed inside another loop.
Null Value
A value showing that a reference or nullable value type currently refers to no value.
Optional Parameter
A parameter with a default value that callers may omit.
params Parameter
A final array parameter that accepts a variable number of arguments.
PascalCase
A naming style that capitalizes the first letter of every word.
Random Class
A class that produces pseudorandom values of several numeric types.
Random Number
A value selected by a generator so its next result is difficult to predict casually.
Range Operator
The .. operator used to select a continuous portion of an indexable value.
Raw String Literal
A multiline string enclosed by at least three double quotes with minimal escaping.
readonly
A field modifier allowing assignment only in the declaration or a constructor.
Recursion
A technique in which a method calls itself with a smaller version of the problem.
Return Type
The type of value a method promises to return.
Return Value
The result a method sends back to its caller.
Scope
The part of a program where a name can be used.
Static Field
A field stored once for the type rather than separately in each object.
String Immutability
The rule that a String's character sequence cannot change after the object is created.
String Index
A zero-based position used to locate a character in a String.
String Interpolation
Building a string by placing expressions inside braces in a string beginning with $.
String Length
The number of UTF-16 code units in a String.
StringBuilder
A class for efficiently building or changing a sequence of characters.
Ternary Operator
A single line if/else statement.
using Directive
A declaration that lets code use a namespace's types without their full names.
var
A keyword asking the compiler to infer a local variable's type from its value.
Verbatim String
A string beginning with @ where backslashes are treated as ordinary characters.
void
A return type showing that a method returns no value.
while Loop
A loop that repeats while its condition remains true.

Journeyman

[Fact] and [Theory]
Defines an xUnit unit test that has no inputs.
[Theory]
An xUnit a unit test with input parameters.
Auto-Implemented Property
A property whose hidden backing field is generated by the compiler.
Base Class
The class from which another class inherits.
Base Class Member
A constructor, method, property, or field inherited or accessed from a base class.
catch Block
A block that handles a matching exception from its try block.
Composition
Building a class from other objects that handle parts of its work.
Constructor
Special class code that initializes a new object.
Constructor Chaining
Calling another constructor so initialization logic can be reused.
Custom Exception
An application-specific exception type created by extending an exception class.
DateTime
A value type representing a date and time, optionally related to local time or UTC.
Default Constructor
A no-argument constructor supplied by the compiler when a class declares none.
Default Interface Method
An interface member with an implementation inherited by implementing types.
Derived Class
A class that inherits from another class.
Encapsulation
Keeping an object's data behind methods that control how it is read or changed.
Equals()
A method used to test whether two objects have equal content.
Exception
An object describing a problem that interrupts normal program flow.
Exception Handling
Using try, catch, and related statements to respond to failures.
File
A static class containing methods for creating, reading, writing, and managing files.
File Input/Output
Reading data from files and writing data to files.
finally Block
A block that normally runs after try and catch whether an exception occurred or not.
GetHashCode()
A method that produces an integer used by hash-based collections.
Getter
A method that returns an object's stored value.
Inheritance
Creating a class that receives accessible members from another class.
Instance
A particular object created from a class.
Interface
A contract describing behavior that implementing classes agree to provide.
internal
An access modifier limiting a type or member to the same assembly.
is Pattern
An is expression that tests a value against a type or another pattern.
JSON Serialization
Converting an object to JSON text or reconstructing an object from JSON.
Method Overriding
Providing a subclass version of an inherited instance method.
Moq and NSubstitute
.NET libraries for creating mocks.
new Operator
An operator that creates an object or array and returns its reference.
Nullable Value Type
A value type followed by ? that can also hold null.
Null-Coalescing Operator
The ?? operator, which uses a fallback when its left value is null.
Null-Conditional Operator
The ?. operator, which accesses a member only when the value is not null.
Object
A class instance that combines its own state with available behavior.
Object Equality
The rules that decide when two objects should count as having the same value.
Path
A string or path-like value identifying a location in a filesystem.
Pattern Matching
Testing a value's type, shape, or contents while optionally extracting parts of it.
Polymorphism
Using one declared type to work with objects that provide different implementations.
private
An access modifier that lets a member be used only inside the class or struct that declares it.
Property
A member that exposes a value through get and set accessors.
protected
An access modifier that lets a member be used inside its own class and in classes that inherit from it.
public
An access modifier that makes a type or member broadly accessible.
Regular Expression
A text pattern used to find, validate, or replace matching characters.
Sealed Method
An overridden method that further derived classes cannot override again.
Serialization
Converting an object's state into data that can be stored or transferred.
Setter
A method that validates or changes an object's stored value.
Shouldly and FluentAssertions
A .NET library used to write human-friendly assertions.
Stack Trace
A report showing the active method calls at the point an error occurred.
StreamReader
A reader that converts bytes from a stream into text characters.
StreamWriter
A writer that converts text characters into bytes for a stream.
this
A reference to the current object inside its instance code.
throw
A statement that deliberately raises an exception object.
ToString()
A method that returns a readable text representation of an object.
try Block
A block containing code that may throw an exception.
using Statement
A statement that disposes a resource automatically when execution leaves its scope.
Virtual Method
A method that derived classes are allowed to override.
XML Documentation Comment
A structured /// comment used to generate documentation for C# code.

Freelancer

Anonymous Type
A compiler-created read-only type defined from an object initializer.
Binary Search - C#
A Binary Search is a searching algorithm used to search a collection or array.
Boxing
Wrapping a value type inside an object reference.
Build Configuration
A named set of build settings, commonly Debug or Release.
Code Analyzer
A tool that examines C# code and reports correctness, design, or style issues.
Collection
An object that stores and organizes a group of values.
Contravariance
Allowing a broader generic input type to be used where a more specific type is expected.
Covariance
Allowing a more specific generic result type to be used where a broader type is expected.
Debug Configuration
Build settings that favor debugging information over optimization.
Debugger
A tool for pausing a program and inspecting its execution state.
Deconstruction
Splitting a tuple or compatible object into separate variables.
Delegate
A type-safe reference to one or more methods with a particular signature.
Dependency
External code that a project needs to compile or run.
Dictionary<TKey, TValue>
A collection that associates unique keys with values.
Event
A member that lets an object notify subscribed code that something happened.
Event Handler
A method or delegate that runs when an event is raised.
Extension Method
A static method callable as though it were an instance method of another type.
FirstOrDefault()
A LINQ operation returning the first item, or the type's default value when none exists.
Generic Constraint
A where clause limiting which types may be used for a generic parameter.
Generics
Type parameters that let classes and methods work safely with different types.
GroupBy()
A LINQ operation that gathers items sharing the same key.
HashSet<T>
An unordered collection that keeps only unique values.
ICollection<T>
An interface for a countable collection that can add, remove, and inspect items.
IEnumerable<T>
An interface for a sequence that can be visited one item at a time.
IEnumerator<T>
An interface for an object that moves through a sequence one item at a time.
Iterator
An object that visits collection elements one at a time.
Lambda Expression
A compact function value written with the => operator.
LinkedList<T>
A collection whose items are stored in connected nodes.
LINQ
C# query operations for filtering, transforming, grouping, and ordering data.
List<T>
A resizable, ordered collection accessed by zero-based index.
Logging
Recording structured runtime events to help operate and diagnose software.
Mock Object
A controlled stand-in used to verify how code interacts with a dependency.
Multicast Delegate
A delegate that invokes several methods in order.
NuGet
The package system used to distribute and install .NET libraries and tools.
NUnit
A .NET framework for organizing and running automated tests.
OrderBy()
A LINQ operation that sorts a sequence by a selected key.
Package Reference
A project-file entry identifying a NuGet package and version the project needs.
Query Expression
SQL-like C# syntax that the compiler translates into LINQ method calls.
Queue<T>
A first-in, first-out collection for values waiting to be processed.
Select()
A LINQ operation that transforms every item in a sequence.
Stack<T>
A last-in, first-out collection where the newest value is removed first.
Test Fixture
The known objects and data prepared for a test.
Tuple
A compact value that groups several values without defining a separate class.
Type Parameter
A placeholder type declared by a generic class, interface, or method.
Unboxing
The compiler's automatic conversion from a wrapper object to its primitive value.
Unit Test
A small automated check of one focused unit of behavior.
Value Tuple
The value-type implementation behind modern C# tuple syntax.
Where()
A LINQ operation that keeps only items satisfying a condition.
xUnit
A popular .NET framework for writing and running automated tests.
Yield Return
A statement that produces the next value from an iterator without building the whole sequence first.

Master

Assembly
A compiled .NET unit containing CIL, metadata, and sometimes resources.
Async/Await
Language features for pausing asynchronous work without blocking its thread.
Attribute
Metadata attached to C# declarations for compilers, tools, or runtime code.
Cancellation Token
A value passed through operations to communicate a request for cancellation.
Common Intermediate Language (CIL)
Platform-independent instructions stored in .NET assemblies and executed by the CLR.
Common Type System
The .NET rules defining how types are declared, used, and shared across supported languages.
Deadlock
A state where threads wait forever for locks held by one another.
Garbage Collection
Automatic recovery of managed heap memory from objects a program can no longer reach.
Generational Garbage Collection
A strategy that groups objects by age so short-lived objects can be collected efficiently.
Heap Memory
Managed runtime memory where reference-type objects are generally allocated.
Lock Statement
A statement that allows only one thread at a time into a protected block for the same lock object.
Managed Code
Code whose execution and memory are managed by the .NET runtime.
Memory Leak
Unwanted memory growth caused by retaining references to objects no longer needed.
Memory<T>
A heap-safe representation of a continuous memory region that can survive asynchronous operations.
Metadata
Information stored in an assembly describing its types, members, references, and attributes.
Pointer
A variable containing the memory address of another value in unsafe code.
Race Condition
A bug where a result depends on unpredictable timing between threads.
Record Type
A reference or value type designed for data with generated value-based equality.
ref Return
Returning a reference to a storage location instead of copying its value.
ref struct
A value type restricted to the stack so it cannot outlive the memory it refers to.
Reflection
Inspecting and using types, members, and annotations at runtime.
Source Generator
A compiler component that examines a program and adds generated C# source during compilation.
Span<T>
A stack-only view over a continuous region of memory without owning that memory.
Stack Memory
Per-thread memory commonly holding call frames, parameters, and local values.
Task
An object representing asynchronous work that may complete later.
Thread
An independently scheduled path of execution inside a process.
Thread Pool
A runtime-managed group of reusable worker threads.
Unsafe Code
A C# context that permits pointers and operations outside normal managed-memory safety.
ValueTask
A value type representing asynchronous work that may already have a result.
Volatile Field
A field whose reads and writes receive special cross-thread visibility rules.
WebApplicationFactory
Starts an ASP.NET Core app in memory for tests.

More subjects in Languages