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".
 
Back
Top