Code4IT

Italian way of code

Latest articles

Enum.HasFlag performance with BenchmarkDotNet

BenchmarkDotNet allows you to test the performance on .NET methods. So let's answer a question: is the Enum.HasFlag method really that slow?

2020-Jun-307 Min Read

Cool validation with FluentValidation

Validating inputs is crucial for every application. If you want an easy and versatile way, you can try FluentValidation.

2020-Jun-168 Min Read

Testing internal members with InternalsVisibleTo

Internal members can be accessed only within the same assembly. And for different assemblies? Here's for you the InternalsVisibleTo attribute!

2020-Jun-024 Min Read

Dependency Injection lifetimes in .NET - my epiphany

Singleton, Scoped and Transient: these are the possible lifetimes for DI with .NET Core. How do they change the way objects are constructed?

5 more things about enums in C#

We've already seen some of the things you should know about enums in C#. Here we'll dive into Flagged enumerations, serialization and so on.

First steps with Docker: download and run MongoDB locally

Docker is a project that allows you to create and run applications in an isolated environment. Let's try it to run MongoDB on your machine!