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
Popular guides
Most readLatest guides
Page 339 of 397C# Index from End: Using the ^ Operator
Use the C# ^ operator to access elements from the end of arrays, lists, strings, and spans. See examples, edge cases, and performance notes.
C# String Slicing with Range
c# string slicing with range: Learn how to slice strings with the C# range operator, including syntax, performance tradeoffs, and practical examples.
C# Array Slicing with Range
C# array slicing with the range operator: practical examples, performance trade-offs, and common pitfalls.
C# Hat Operator: Using Index from the End
c# hat operator: Learn how the C# hat operator (^) provides index-from-end access for arrays, lists, and spans with practical examples and performance notes.
C# Index Operator: Using ^ and ^.. Syntax
c# index operator: Learn how the C# index operator (^) and range operator (..) work, with practical examples for arrays, lists, and custom types.
Using the C# Range Operator
c# range operator: Learn how the C# range operator works for slicing arrays, strings, and collections, including syntax, edge cases, and performance considerations.
Using C# Memory Slice for Efficient Data Access
c# memory slice: Learn how to use Slice on Memory<T> and ReadOnlyMemory<T> in C# to share data ranges without copying or allocating new arrays.
C# Span vs Memory: Choosing the Right Type
c# span vs memory: Learn when to use Span<T> and when to use Memory<T> in C#. Understand stack-only constraints, async limitations, streaming scenarios, and practical...
C# Memory vs ReadOnlyMemory: Choosing the Right Type
Understand the difference between Memory<T> and ReadOnlyMemory<T> in C#, when to use each, and how they relate to Span<T> for efficient buffer handling.
C# Memory Usage: Diagnosing and Reducing Allocations
Practical techniques for profiling C# memory usage, reducing allocation hotspots, reusing buffers, and avoiding common GC traps.