Grant Winney
  • About
  • Code
  • Questions
  • Tools of the Trade

Metadata  

What are generic attributes in C# 11?

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.
Aug 23, 2023
Using Attributes in C#

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...
Apr 4, 2019

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.
Feb 4, 2015
Send me new posts: *

  • Connect
  • Privacy
  • License
  • Cross-Posting
Grant Winney © 2025. Powered by Ghost