.Net Programming

Explore the .Net with the latest in C# from basic to advanced, including .Net versions 9, 8, 6, 5, Core 3.1, .Net Framework, ASP.NET Core, MVC, design patterns, OOPS, and SOLID principles. Get top tutorials, best practices, and hands-on code examples on GitHub.

Member-only story

Featured

Day 7 — .NET Performance Series

The Battle of C# Serializers: BinaryFormatter vs. MessagePack vs. Protobuf (with .NET 8 Benchmarks)

Why BinaryFormatter Is Dead, and How MessagePack and Protobuf Took Over Serialisation in Modern .NET Apps

4 min readApr 21, 2025

--

Free Friend Link for Non-Members

Created by Author using Canva

Access the complete performance series here

.Net Performance Series

15 stories

In 2014, I wrote my first serialisation logic in C#. It was a simple data transfer scenario — one class, five properties, and a network pipe. Like many others, I picked BinaryFormatter because it just... worked. Until one day, it didn’t.

That day came in 2020 when Microsoft officially marked BinaryFormatter as obsolete. A flood of security concerns and performance bottlenecks finally caught up with the aging formatter. And so began my journey of discovering alternatives—MessagePack and Protobuf.

Let’s go deep, not just in comparison, but as a seasoned developer would: with benchmarks…

--

--

.Net Programming
.Net Programming

Published in .Net Programming

Explore the .Net with the latest in C# from basic to advanced, including .Net versions 9, 8, 6, 5, Core 3.1, .Net Framework, ASP.NET Core, MVC, design patterns, OOPS, and SOLID principles. Get top tutorials, best practices, and hands-on code examples on GitHub.

Sukhpinder Singh | C# .Net
Sukhpinder Singh | C# .Net

Written by Sukhpinder Singh | C# .Net

C# .Net developer 👨‍💻 who's 100% convinced my bugs are funnier than yours. 🐛💥 #BugLife Pubs: https://medium.com/c-sharp-programming

Responses (3)