
Signature
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.org
http://www.edujini.in | http://webservices.edujini.in
-------------------
thanx for the reply.
I would like to avoid run-time errors caused by objects that apply my
attributes to their class members.
I could have used simply interfaces but I need more info on the members such
as descriptions, and other things.
plus I wish to avoid the need of implementing my interface AND applying
attributes.
when I apply an attribute that is defined to target a method to a property,
i get a compilation error right?
cant I extend this and create attributes that will validate certains
constrains and produce compile-time errors?
> New/Custom attributes that you created would not be understood by Visual
> Studio / Compiler..
[quoted text clipped - 12 lines]
>> thanx,
>> Picho
Ben Voigt - 26 Jun 2006 14:56 GMT
> thanx for the reply.
>
[quoted text clipped - 6 lines]
> plus I wish to avoid the need of implementing my interface AND applying
> attributes.
You probably do want both... method calls through interfaces are many times
faster than reflection on attributes and a reflected call.
> when I apply an attribute that is defined to target a method to a
> property, i get a compilation error right?
[quoted text clipped - 19 lines]
>>> thanx,
>>> Picho
Gaurav Vaish (www.EduJini.IN) - 28 Jun 2006 18:59 GMT
> I could have used simply interfaces but I need more info on the members
> such as descriptions, and other things.
Define interfaces.
Define attributes.... do both.
The implementation class can be discovered dynamically using reflection (say
from config files).
Use the reference to the implementation for all uses. Whenever required,
reflect on the class to find attribute values.

Signature
Happy Hacking,
Gaurav Vaish | http://www.mastergaurav.org
http://www.edujini.in | http://webservices.edujini.in
-------------------