Using Attributes as Interface implementaion, good or bad?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Has anybody ever used custom attributes to implement a custom interface for a
user defined type?

thx
-jsh
 
Has anybody ever used custom attributes to implement a custom interface for a
user defined type?

An attribute can't implement interfaces for types it's applied to, if
that's what you mean.


Mattias
 
Hi Mattias Sjögren,
Thanks for the response.
I say you Attributes do implement Interfaces, you have to define an
Attribute type to support it. However, is that consider 'breaking' or
'stretching' the contract, when using Reflection, when the udt wants other
types to use itself?

thx
-jsh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top