Mert Özen Further With Every Line

Blog

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

Series
397 posts found
What's New in C# 13: params Collections, Lock and Partial Properties
Backend PART 04

What's New in C# 13: params Collections, Lock and Partial Properties

C# 13 next to its C# 10 equivalents: the new Lock type and the CS9216 trap, params collections with an allocation measurement, ref structs implementing interfaces and allows ref struct, partial properties, OverloadResolutionPriority, the \e escape and ^ indexes in initializers.

7 Nov 2026 8 min 17
What's New in C# 12: Primary Constructors and Collection Expressions
Backend PART 03

What's New in C# 12: Primary Constructors and Collection Expressions

C# 12 next to its C# 10 equivalents: why a primary constructor is a parameter rather than a property and the CS9124 warning, square-bracket collection expressions and spread, default lambda parameters, alias any type, inline arrays, the Experimental attribute and a note on interceptors.

7 Nov 2026 8 min 15
What's New in C# 11: Raw Strings, required and List Patterns
Backend PART 02

What's New in C# 11: Raw Strings, required and List Patterns

How we wrote it in C# 10 and how we write it in C# 11: raw string literals and the culture trap, required members and SetsRequiredMembers, list patterns, generic math with its language and library legs, file-local types and UTF-8 literals.

7 Nov 2026 8 min 16
C# Versions: A Short History from 1.0 to 10
Backend PART 01

C# Versions: A Short History from 1.0 to 10

The signature features, release dates and .NET pairings of every version from C# 1.0 to C# 10; compiling the same code with different LangVersion values to see how the compiler tells you which feature came from which version.

7 Nov 2026 13 min 20
Unit Testing in C#: xUnit, Theory/InlineData and Testable Code
Backend PART 14

Unit Testing in C#: xUnit, Theory/InlineData and Testable Code

The hidden dependencies behind a flaky test, an xUnit test project, Fact and Assert, Theory/InlineData/MemberData, taking time from outside with IClock, and pitfalls like decimal InlineData and async void.

7 Nov 2026 8 min 16
Dependency Injection Basics in C#: Lifetimes, the Container and Captive Dependencies
Backend PART 13

Dependency Injection Basics in C#: Lifetimes, the Container and Captive Dependencies

Constructor injection with Microsoft.Extensions.DependencyInjection, singleton/scoped/transient, the container's disposal duty, captive dependencies and ValidateScopes, multiple registrations, TryAdd and factories.

7 Nov 2026 9 min 10
Performance in C#: Allocations, Structs and Measuring with BenchmarkDotNet
Backend PART 12

Performance in C#: Allocations, Structs and Measuring with BenchmarkDotNet

Why Stopwatch isn't enough, setting up BenchmarkDotNet 0.15.8 and reading its table, the measured difference between classes and structs, hidden allocations from boxing and closures, and benchmark pitfalls.

7 Nov 2026 10 min 14
Source Generators in C#: Generating Code at Compile Time with IIncrementalGenerator
Backend PART 11

Source Generators in C#: Generating Code at Compile Time with IIncrementalGenerator

Writing an incremental generator that adds code during the build: the netstandard2.0 project and Roslyn version, the pipeline and caching, seeing the generated code, and the partial and hint name pitfalls.

7 Nov 2026 9 min 11
Interop and unsafe Code in C#: P/Invoke, Pointers and fixed
Backend PART 10

Interop and unsafe Code in C#: P/Invoke, Pointers and fixed

AllowUnsafeBlocks and pointers, pinning against the GC with fixed, calling libc with DllImport, string marshalling, callbacks with function pointers, and keeping unsafe code small with NativeMemory and spans.

7 Nov 2026 7 min 12
ref Returns, ref Locals, in Parameters and ref struct in C#
Backend PART 09

ref Returns, ref Locals, in Parameters and ref struct in C#

Moving values by reference instead of copying them: ref locals, ref returns, ref readonly, the defensive-copy trap with in parameters, readonly structs and writing your own ref struct.

7 Nov 2026 10 min 11
Span<T> and Memory<T> in C#: Allocation-Free Parsing, stackalloc and ref struct Rules
Backend PART 08

Span<T> and Memory<T> in C#: Allocation-Free Parsing, stackalloc and ref struct Rules

Copy-free slicing and allocation-free parsing with Span<T>, a measured allocation difference, stackalloc and its safe pattern, ref struct restrictions, and Memory<T> for async code.

7 Nov 2026 10 min 15
Expression Trees in C#: Holding a Lambda as Data, and the Bridge to EF Core
Backend PART 07

Expression Trees in C#: Holding a Lambda as Data, and the Bridge to EF Core

The difference between Func and Expression<Func>, looking at the tree's nodes and Compile, building a dynamic filter with Expression factory methods, a small SQL translator with ExpressionVisitor, IQueryable and EF Core 6's ToQueryString output, a captured variable turning into a parameter, the untranslatable method error, limits such as CS0834, CS8072 and CS8110, and the 70-microsecond cost of Compile measured with BenchmarkDotNet.

7 Nov 2026 11 min 9
Blog Map