What are generic attributes in C# 11? Generic attributes increase the flexibility of a very early .NET feature. Let's try using them and see how it keeps our code DRY.
Using Attributes in C# Ever thought it'd be convenient to attach metadata to your code at design time, then read it at runtime? Attributes let you do just that - to methods, classes, tests, enumerations, and more. Use reflection to read them at runtime and take some action. Here's a few examples for the uninitiated...
Obsolete Attribute on a Class is Ignored When an Interface is Involved The Obsolete attribute on a class is ignored when an interface is involved. It caught me by surprise, but makes sense. Let's see why.