A 10 minute introduction to C# Attributes
Are C# Attributes underrated? Should you use them more? Let's find out together!
C# Attributes are an integral part of the .NET ecosystem. They are used to add metadata to code, which can be used by compilers and other tools.
Anyone who wrote more than a few lines of C# code has probably used attributes. Whether it was to add validation to your models, configure the routing of your API, or modify the behavior of some other library, attributes are everywhere.
Learning how to use attributes and how to write your own definitely pays off. It will help you to write cleaner code, and it will make you a better developer.
Join me while we explore C# attributes and their usages. Whether it be the built-in attributes, custom ones or even how to use them for Source Generators, we will cover it all.