Italian way of code

Latest articles

5 things about DateTime time zones and formatting

You're using DateTime.Now, aren't you? Be careful, because it may bring some troubles to your application. Here I'll explain why and I'll talk about time zones and formatting in C# DateTime.

2020-Jul-287 Min Read

Clean code tips - names and functions

I don't have to tell you why you need to write clean code. Here you'll see some tips about how to name things and how to structure functions

2020-Jul-2112 Min Read

How to mock dependencies with Manifest resources

Sometimes on your tests you need to access test files, for example for mocking external data. With manifest resources you can easily reference files for your tests.

2020-Jul-145 Min Read

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?

Cool validation with FluentValidation

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

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!