Handling dates is never trivial. And handling JSON serialization and deserialization of dates is even more difficult. And, even worse, how can you convert a value as DateTime, DateTimeOffset, DateOnly and TimeOnly?
Continue reading
In C#, Attributes are a handy mechanism to attach metadata to your classes, methods, properties, etc. In this article, we will see how to create custom Attributes and access them at runtime using Reflection.
Continue reading
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?
Continue reading
Let’s dive deep into the CallerMemberName attribute and explore its usage from multiple angles. We’ll see various methods of invoking it, shedding light on how it is defined at compile time.
Continue reading
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!
Continue reading
Bogus is a library that generates realistic values for your data. When populating fake user names, instead of Foo and Bar, you can have John and Sarah. Let’s see two ways to define and reuse a Faker definition.
Continue reading