By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,625 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,625 IT Pros & Developers. It's quick & easy.

attribute question

P: n/a
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

Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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".

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Bob" <no*****@nospam.net> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
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


Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.