Mark,
I've used them extensively on enumeration values, used in a class
factory pattern (I use the enumeration value as the key). It definitely is
a better way to store comples static information, IMO. This way, you don't
have to go through the mess of populating your data structures and creating
the backing store for them.
That's just one use. I've used them to provide interception-like
capabilities, as well as in plug in architectures (to indicate how a type
will fit into the architecture, and provide some default capabilities).
There are plenty of uses out there for attributes. It's really a great
feature to have in the framework, since the uses are pretty vast.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"mark" <fi******@removethisforspam.umn.edu> wrote in message
news:eu*************@TK2MSFTNGP15.phx.gbl...
Could someone please give me a practical example of how you HAVE used
custom attributes ... not just how you COULD use them. I understand the
syntax, but am not able to visualize a good use for them.
Thanks in advance.
Mark