Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
137 posts found
LINQ Partitioning: Take, Skip, TakeWhile, Chunk and Take(Range)
Backend PART 06

LINQ Partitioning: Take, Skip, TakeWhile, Chunk and Take(Range)

Why TakeWhile is not a filter, correct paging with Skip and Take and the silent rule of ordering, how TakeLast/SkipLast read to the end, Take(Range) from .NET 6 versus array slicing, splitting into batches with Chunk, and exactly how much of the source the partitioning operators read.

7 Nov 2026 10 min 9
LINQ Element Operators: First, Last, Single, ElementAt and OrDefault
Backend PART 05

LINQ Element Operators: First, Last, Single, ElementAt and OrDefault

The First, Last, Single and ElementAt families and their OrDefault siblings; how 0 gets confused with 'not found' on value types, .NET 6's default value parameter and Index overloads, the difference in intent between First and Single, and nullable warnings.

7 Nov 2026 9 min 9
Projection with LINQ: Select, SelectMany and Anonymous Types
Backend PART 04

Projection with LINQ: Select, SelectMany and Anonymous Types

One-to-one projection with Select and one-to-many with SelectMany; mapping to DTOs, keeping parent data with a result selector, the Cartesian product, the equality and with rules of anonymous types, and tuple versus record outside a method.

7 Nov 2026 10 min 11
Filtering and Sorting with LINQ: Where, OrderBy, ThenBy and Reverse
Backend PART 03

Filtering and Sorting with LINQ: Where, OrderBy, ThenBy and Reverse

Where and its index overload, why a second OrderBy wipes out the first, multi-key sorting with ThenBy, stable OrderBy versus unstable List.Sort, culture-sensitive string ordering, and how Reverse differs from OrderByDescending.

7 Nov 2026 10 min 6
LINQ Deferred Execution: When Does a Query Run? IEnumerable and IQueryable
Backend PART 02

LINQ Deferred Execution: When Does a Query Run? IEnumerable and IQueryable

Why a LINQ query runs when it is iterated rather than when it is defined, element-by-element streaming, immediate and buffering operators, the cost of multiple enumeration, and the IEnumerable versus IQueryable split through Func and expression trees.

7 Nov 2026 10 min 8
What Is LINQ? Query Syntax and Method Syntax in C#
Backend PART 01

What Is LINQ? Query Syntax and Method Syntax in C#

What LINQ changes about the queries we used to write with loops, the C# 3.0 features behind it, how the compiler translates query syntax into method calls, when to pick which notation, and the first pitfalls.

7 Nov 2026 11 min 7
C# 13–14 and .NET 9–10: OrderedDictionary, params Collections and More
Backend PART 11

C# 13–14 and .NET 9–10: OrderedDictionary, params Collections and More

Why Dictionary promises no order and .NET 9's generic OrderedDictionary, .NET 10's index-returning TryAdd/TryGetValue, PriorityQueue.Remove, allocation-free alternate lookup, C# 13 params collections and C# 14 extension members and span conversions.

7 Nov 2026 11 min 8
C# 11–12 and .NET 7–8: Generic Math, Frozen and Collection Expressions
Backend PART 10

C# 11–12 and .NET 7–8: Generic Math, Frozen and Collection Expressions

The generic sum you couldn't write in C# 10, generic math with static abstract members and INumber<T>; FrozenDictionary and FrozenSet, built once and read many times, measured with BenchmarkDotNet; square-bracket collection expressions, spread and CollectionBuilder.

7 Nov 2026 12 min 9
Generic Variance in C#: Covariance and Contravariance (in and out)
Backend PART 09

Generic Variance in C#: Covariance and Contravariance (in and out)

Why can't a List<EBook> be a List<Book> when it can be an IEnumerable<Book>? The hole in array covariance, covariance with out, contravariance with in, variance in delegates, the limits of the rules and the cast trap CS0266 suggests.

7 Nov 2026 10 min 10
Immutable Collections in C# and Choosing the Right Collection
Backend PART 08

Immutable Collections in C# and Choosing the Right Collection

The difference between a read-only view and real immutability, structural sharing in ImmutableList, builders, ImmutableArray versus ImmutableList measured with BenchmarkDotNet, and choosing the right collection with a complexity map.

7 Nov 2026 11 min 11
C# Collection Interfaces: IEnumerable, ICollection, IList and yield return
Backend PART 07

C# Collection Interfaces: IEnumerable, ICollection, IList and yield return

What IEnumerable, ICollection, IList and the IReadOnly* interfaces promise and what they don't; why an array throws on Add, exposing an internal list safely, choosing parameter types and writing lazy iterators with yield return.

7 Nov 2026 11 min 9
Sorted Collections in C#: SortedList, SortedDictionary, SortedSet and IComparer
Backend PART 06

Sorted Collections in C#: SortedList, SortedDictionary, SortedSet and IComparer

A book silently lost from a SortedSet when the comparer returns zero, and the tie-breaking second criterion. SortedDictionary on a red-black tree, SortedList with two sorted arrays and when to pick which; Min, Max and the live GetViewBetween on SortedSet; IComparer, culture-sensitive string order and broken comparer traps.

7 Nov 2026 8 min 9
Blog Map