attribute question

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Would it be out of the question to ask MS to allow delegates - even if they can
only refer to static methods - to be included in attribute paramaters? Something
like the code below?

Bob

<SomeCustomAttribute(AddressOf DoSomething)> _
Public Class SomeClass

Public Shared Sub DoSomething(ByVal args as SomeArgs)

End Sub

End Class
 
Hello Bob,

If if this was possible, when do you think these delegates would be
activated? ;-) I feel your ultimate target is what is called
"Aspect-Oriented Programming" when method functionality can be amended by
applying special attributes. This is described in an article available in
the MSDN library. Just do a search for "aspect-oriented programming".
 

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