Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

Illustration of ArraySegment<T> representing a slice of an array with offset and count in C#
C#

Using ArraySegment in C# to Slice Arrays Without Copying

ArraySegment<T> in C#: wrap part of an array without copying, read Offset and Count, pass slices to methods, and see where Span<T> is the better choice.

ArraySegmentC# ArraysMemory ManagementSpan<T>
Side-by-side comparison of a fixed-size C# array and a dynamic List<T> collection
C#

C# Array vs List: Choosing the Right Collection Type

c# array vs list: Compare C# arrays and List<T> for fixed-size and dynamic collections, covering memory, performance, API differences, and when each type fits best.

arraysList<T>collectionsperformance
Comparison of C# multidimensional array and jagged array memory layout
C#

C# Multidimensional Array vs Jagged Array: Key Differences

Compare C# multidimensional and jagged arrays: syntax, memory layout, performance, and when to choose each for your code.

C# arraysjagged arraymultidimensional arrayC# performance
Illustration of a jagged array as an array of arrays with varying lengths
C#

C# Jagged Array: Syntax, Usage, and Performance

C# jagged array: Learn how to declare, initialize, and iterate C# jagged arrays, understand their memory layout, and see when they outperform multidimensional arrays.

C#arraysjagged arraysmultidimensional arrays
Diagram showing a two-dimensional array as a grid of cells with row and column indices, in a clean software engineering style.
C#

C# Two-Dimensional Array: Syntax, Usage, and Performance

Learn how to declare, initialize, and access two-dimensional arrays in C#. Compare multidimensional and jagged arrays, and understand performance trade-offs.

C#multidimensional arraysjagged arraysmemory layout
Diagram showing a two-dimensional C# array as a grid of cells with rows and columns visually distinct and index labels on the edges
C#

C# Multidimensional Array: Syntax and Usage

Learn how to declare, initialize, and iterate C# multidimensional arrays, including rectangular vs jagged arrays and performance tradeoffs.

C#arraysjagged arraysdata structures
Illustration of a C# array with a highlighted element being checked for existence using the Contains method.
C#

C# Array Contains: Methods and Performance

Learn how to check whether a C# array contains a value using LINQ Contains, Array.IndexOf, and manual loops, with performance and edge-case considerations.

C#arraysLINQContains
Illustration of a magnifying glass over an array of boxes with a highlighted index position, representing C# Array.IndexOf.
C#

C# Array IndexOf: Find Element Positions

Learn how to use C# Array.IndexOf to find element positions, handle missing values, and compare it with LINQ alternatives.

C#ArrayIndexOfLINQ
Illustration of a magnifying glass over a C# array with search methods.
C#

C# Search Array: IndexOf, Find, and LINQ

Learn how to search arrays in C# using IndexOf, Find, FindIndex, and LINQ, and understand when each approach fits best.

C#ArrayLINQSearch
Illustration of an array being reversed with the C# Array.Reverse method, showing elements swapping order.
C#

C# Array Reverse Method: Usage and Overloads

Learn how to use C#'s Array.Reverse method: its overloads, in-place behavior, range reversal, performance tradeoffs, and when LINQ's Reverse is a better fit.

Array.ReverseC# ArraysLINQ ReverseIn-Place Reversal