Browse by Topic

Popular

Latest

Latest Posts

Illustration of a string being split into segments by a delimiter, representing the C# String.Split method.
C#

C# String Split: Overloads, Options, and Pitfalls

Learn how to use C# String.Split for real-world parsing: overloads, delimiter types, StringSplitOptions, performance trade-offs, and common pitfalls with practical examples.

C#String.SplitString Parsing.NET
A visual metaphor showing a string being sliced into segments, with one segment highlighted to represent the substring extraction range in C#.
C#

C# Substring: Syntax, Errors, and Alternatives

Learn how to use the C# Substring method correctly: syntax, boundary rules, common patterns, and allocation-aware alternatives for high-throughput code.

C# StringString ManipulationSubstring MethodReadOnlySpan
Illustration of a string with a measurement ruler, symbolizing the C# string Length property and its code unit counting.
C#

C# String Length: Property, Pitfalls, and Performance

Understand the C# string Length property, including UTF-16 code units, null handling, and performance trade-offs.

C#String LengthUTF-16Unicode
Illustration of C# string format placeholders and format specifiers in a code editor.
C#

C# String Format: Composite Formatting and Specifiers

c# string format: Learn C# string format with composite formatting, format specifiers, alignment, culture handling, and performance tradeoffs.

C#String.FormatComposite FormattingString Interpolation
Diagram showing C# string interpolation with format specifiers and alignment, illustrating how values are inserted into a template.
C#

C# String Interpolation Formatting: Syntax and Specifiers

C# string interpolation formatting: alignment, format specifiers, culture handling, common pitfalls, and performance tradeoffs.

C#String InterpolationFormat Specifiers.NET
Illustration of C# string interpolation showing a formatted string with embedded expressions being resolved to output text.
C#

C# String Interpolation: Syntax, Performance, and Edge Cases

Learn C# string interpolation syntax, compiled behavior, format specifiers, performance characteristics, and edge cases that matter in production code.

C#string interpolation.NETstring formatting
A visual comparison of C# string concatenation methods showing immutable string pieces being copied into a new combined block versus a single growing buffer.
C#

C# String Concatenation: Choosing the Right Approach

Learn how C# string concatenation works under the hood, compare the + operator, String.Concat, interpolation, and StringBuilder, and choose the right approach for your scenario.

string concatenationStringBuilderstring interpolationC# performance
Diagram illustrating C# string immutability and concatenation performance
C#

C# String Usage: Methods, Immutability, and Performance

Explore practical C# string usage: common methods, immutability, concatenation, interpolation, comparison, and performance tradeoffs.

C# stringsStringBuilderstring interpolationstring immutability
A visual metaphor showing a Span<T> view pointing into an array, illustrating zero-allocation slicing in C#.
C#

Using C# Span with Arrays for Zero-Allocation Slicing

c# span with arrays: Learn how to use Span<T> with arrays in C# to slice, modify, and pass array data without allocating new memory, and understand the ref struct limi...

C#Span<T>ArraysMemory Management
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

Learn how to use ArraySegment<T> in C# to work with slices of arrays without copying data. See how to create segments, pass slices to methods, and compare ArraySegment<T> with Span<T>.

ArraySegmentC# ArraysMemory ManagementSpan<T>