Immutable Data Structures in C# and .NET

Immutable objects – aka objects whose properties and fields can’t change after instantiation – are one of the fundamental pillars of functional programming. Yet, it also has other great uses in classically object-oriented languages such as C#. Immutability can help make your code cleaner, easier to reason about, and reduce runtime errors. But how can you do that without making it feel like you’re fighting against the typically-mutable C# and the entire .NET Framework? This session discusses immutability and how you can apply it in your day-to-day as a .NET/C# developer. It presents immutable objects, immutable collections, and how you can refactor your code to successfully apply immutability to your existing codebase. This talk also discusses the implications of introducing immutability to your code, both positive and negative.

Video producer: