Davide Bellone | www.code4it.dev's Avatar

Davide Bellone | www.code4it.dev

@bellonedavide.bsky.social

Author | Speaker | Microsoft MVP I publish content about #csharp, #dotnet, and #softwareArchitecture. ๐Ÿ‘จโ€๐Ÿ’ป Author of http://code4it.dev ๐Ÿง https://linktr.ee/davidebellone

244 Followers  |  414 Following  |  100 Posts  |  Joined: 27.10.2023
Posts Following

Posts by Davide Bellone | www.code4it.dev (@bellonedavide.bsky.social)

Preview
Readonly vs Immutable vs Frozen in C#: differences and (a lot of) benchmarks The words ReadOnly, Immutable, Frozen seem similar but have distinct meanings in .NET. Hereโ€™s a detailed comparison of Readonly, Immutable, and Frozen collections in C#, with benchmarks and typical us...

A new article!

Readonly vs Immutable vs Frozen in C#: meanings + benchmarks.

1๏ธโƒฃ Readonly = view, can still change
2๏ธโƒฃ Immutable = snapshot, new instance on update
3๏ธโƒฃ Frozen = build once, fastest lookups

Read & comment! ๐Ÿ”ฅ #dotnet #csharp #performance
www.code4it.dev/blog/readonl...

24.02.2026 08:19 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Board of Peace

21.01.2026 07:59 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

`DiagnosticSuppressor` shines, when we want a dynamic behavior for enabling/disabling a `DiagnosticAnalyzer`. Here I am covering them and of course with tests ๐Ÿ˜‰

๐Ÿ‘‰๐Ÿผ bit.ly/4p8d99a or scan the QR code!

#Roslyn #DiagnosticAnalyzer #DiagnosticSuppressor #SourceGenerator #csharp #dotnet

16.11.2025 12:00 โ€” ๐Ÿ‘ 1    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Love this #copilot suggestion: all items are lowercase, but they should be lowercase!!
๐Ÿ˜€๐Ÿ˜€

31.10.2025 08:43 โ€” ๐Ÿ‘ 2    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Introducing the Testing Vial: a (better?) alternative to Testing Diamond and Testing Pyramid The Testing Pyramid focuses on Unit Tests; the Testing Diamond focuses on Integration Tests; and what about the Testing Vial?

www.code4it.dev/blog/testing...

12.10.2025 10:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

The Testing Pyramid emphasises Unit Tests.
The Testing Diamond emphasises Integration Tests.

But I really think we should not focus on technical aspects.

That's why I came up with the Testing Vial.

Let me know what you think of it!

12.10.2025 10:32 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

Good to know that .NET STS releases will now be supported for 24 months instead of 18 months.

The end of support will coincide with the release of the next STS, as a soft push to companies to upgrade to the newer versions.

23.09.2025 20:46 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

I left Twitter because of all those fake accounts, and now... they're here >sigh<

19.09.2025 06:48 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image Post image Post image

Hexagons

18.09.2025 13:15 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
a picture of a man 's face with the word alva on the bottom right ALT: a picture of a man 's face with the word alva on the bottom right

I just realised that my city, Turin, is famous for two opposite things:

- Juventus Football Club
- the Shroud

11.09.2025 16:00 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Ready to make your C# tests rock-solid? ๐ŸŽธ Discover how TimeProvider & FakeTimeProvider help you inject and test current time easily!

1๏ธโƒฃ Simplify date handling in tests
2๏ธโƒฃ Boost reliability with FakeTimeProvider
3๏ธโƒฃ No more custom wrappers!

Read & comment!๐Ÿ‘‡
#dotnet #csharp #testing

03.09.2025 08:58 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
C# Tip: injecting and testing the current time with TimeProvider and FakeTimeProvider Dates used to be difficult to test. But with TimeProvider and FakeTimeProvider, everything becomes possible!

Here's the link:
www.code4it.dev/csharptips/t...

03.09.2025 08:58 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Ready to make your C# tests rock-solid? ๐ŸŽธ Discover how TimeProvider & FakeTimeProvider help you inject and test current time easily!

1๏ธโƒฃ Simplify date handling in tests
2๏ธโƒฃ Boost reliability with FakeTimeProvider
3๏ธโƒฃ No more custom wrappers!

Read & comment!๐Ÿ‘‡
#dotnet #csharp #testing

03.09.2025 08:58 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
a taco with arms and legs is dancing on a white background ALT: a taco with arms and legs is dancing on a white background

As expected

16.08.2025 08:50 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
Build your own Static Code Analysis tool in .NET by knowing how Assembly, Type, MethodInfo, ParameterInfo work. Why buy a whole tool when you can build your own? Learn how the Type system works in .NET, and create your own minimal type analyser.

Here's the link!

www.code4it.dev/blog/assembl...

06.08.2025 14:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

๐Ÿ” Want to build your own static code analysis tool in .NET? Discover how Assembly, Type, MethodInfo & ParameterInfo work!

1๏ธโƒฃ Learn to inspect assemblies & types
2๏ธโƒฃ Master method & parameter analysis
3๏ธโƒฃ Build custom analyzersโ€”no big tools needed!

Read & comment!
#dotnet #CSharp #CodeAnalysis #DevTips

06.08.2025 14:55 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
C# Tip: Handling exceptions with Task.WaitAll and Task.WhenAll Task.WhenAll and Task.WaitAll are common methods in C# that allow you to execute multiple Tasks. Butโ€ฆ what happens when an exception is thrown?

C# Tip: Handling exceptions with Task.WaitAll and Task.WhenAll

www.code4it.dev/csharptips/t...

11.06.2025 08:40 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

๐Ÿš€ Curious about error handling in C# async?

My latest article breaks down Task.WhenAll vs Task.WaitAll!

1๏ธโƒฃ Real code examples & outputs
2๏ธโƒฃ Key differences in exception handling
3๏ธโƒฃ Practical tips for modern C# devs

Read & comment your thoughts!
#dotnet #csharp #async #programming

link in comments

11.06.2025 08:40 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Post image

How to run SonarQube analysis locally with Docker by @bellonedavide.bsky.social www.code4it.dev/blog/sonarqu... #aspnetcore

30.05.2025 08:44 โ€” ๐Ÿ‘ 2    ๐Ÿ” 1    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
How to run SonarQube analysis locally with Docker The quality of a project can be measured by having a look at how the code is written. SonarQube can help you by running static code analysis and letting you spot the pain points. Letโ€™s learn how to in...

www.code4it.dev/blog/sonarqu...

28.05.2025 13:46 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

๐Ÿš€ Wanna boost your code quality with SonarQube + Docker! Learn how to set it up locally and run your first analysis. ๐Ÿ› ๏ธ

1๏ธโƒฃ Easy Docker setup for SonarQube
2๏ธโƒฃ Step-by-step guide for ASP.NET projects
3๏ธโƒฃ Navigate insightful reports ๐Ÿง‘โ€๐Ÿ’ป

๐Ÿ‘‰ Link in comments!
#CodeQuality #SonarQube #Docker #DotNET

28.05.2025 13:46 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0

In a dystopic future, I can see Tesla taxis giving you a different quality of service depending on what you've posted on Twitter.

23.04.2025 10:10 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Visual Studio Intellisense is weird:

Who is Joseph Maloney? Why does his name appear in my code??

21.03.2025 14:57 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Never happened before: I celebrated the successful downgrade of the application I'm working on ๐Ÿ˜‚๐Ÿ˜‚

14.02.2025 11:21 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
D2: like Mermaid, but better. Syntax, installation, and practical usage tips D2 is an open-source tool to design architectural layouts using a declarative syntax. Itโ€™s a textual format, which can also be stored under source control. Letโ€™s see how it works, how you can install it, and some practical usage tips.

You can read the article here:

www.code4it.dev/architecture...

04.02.2025 16:30 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

๐Ÿง D2 Diagrams: An Alternative to Mermaid๐Ÿง

Tired of #Mermaid?
My latest article dives into the world of #D2 diagrams and shows you how to create your own!

Everything's defined as a text, but with more elements and ways to describe the #architecture

(link in the first comment)

04.02.2025 16:30 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0
Preview
a cartoon of peter griffin talking to a butcher in a butcher shop ALT: a cartoon of peter griffin talking to a butcher in a butcher shop

Just a kind reminder:
In Italy, we donโ€™t have a clue of what Fettuccine Alfredo are.

Same for spaghetti with meatballs.

Never eat them, and you will not find them in any house or restaurant

๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ๐Ÿ

30.01.2025 21:17 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Post image

Ok, I'm officially an Open Source contributor ๐Ÿ˜‚

30.01.2025 15:58 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0
Preview
C# Tip: How to create Custom Attributes, and why they are useful Applying custom attributes to C# classes and interfaces can be useful for several reasons. Letโ€™s learn how to create Custom Attributes in C#, and letโ€™s explore some practical usage!

Read the article here:

www.code4it.dev/csharptips/c...

23.01.2025 13:39 โ€” ๐Ÿ‘ 0    ๐Ÿ” 0    ๐Ÿ’ฌ 0    ๐Ÿ“Œ 0

๐Ÿง Unlock the Power of Custom C# Attributes! ๐Ÿง

Wanna make your #CSharp code more expressive and powerful?
My latest article dives into the world of custom C# attributes and shows you how to create your own!

1๏ธโƒฃ Enhance Code Readability
2๏ธโƒฃ Add Metadata
3๏ธโƒฃ Enhance searchability
๐Ÿ‘‡

23.01.2025 13:39 โ€” ๐Ÿ‘ 1    ๐Ÿ” 0    ๐Ÿ’ฌ 1    ๐Ÿ“Œ 0