MR.ABC
MR.ABC

Reputation: 4862

C# Attributes, Simple way get the value of tagged properties

I want to make a attribute class. Every property with the attribute tag calls a function. In those functions I need the value and type of the property. Since 4.5 there are some new nice features.

Is it really necessary to look inside the whole assembly for all properties with these attribute tag ?

Upvotes: 2

Views: 81

Answers (1)

Mike Perrenoud
Mike Perrenoud

Reputation: 67898

According to this MSDN article there is nothing new surrounding attributes in .NET 4.5 - so what you've been doing in the past still needs done. However, one thing that is new is the Managed Extensibility Framework (MEF), which can help you get rid of attributing in some scenarios.

Explaining that is outside the scope of this question.

But here is an extremely detailed link regarding the MEF.

Upvotes: 1

Related Questions