Hi.
I would like to know whether the usage of Attributes in .Net, specifically C#, is expensive, and why or why not?
I am asking about C# specifically, unless there is no difference between the different .Net languages (because the base class libraries are the same?).
All the newer .Net technologies make extensive use of attributes, such as Linq to SQL, ASP.Net MVC, WCF, Enterprise Library, etc, and I was wondering what effect this would have on performance. Alot of the classes get automatically decorated with certain Attributes, or these attributes are required for certain functionality/features.
Does the question of expense depend on implementation specific details? How are Attributes compiled to IL? Are they cached automatically, or is this up to the implementor?