The answer to this question: http://stackoverflow.com/questions/1210609 Doesn't really tell me much... doesn't tell me anything at all to be blunt.
I came across a blog about performance in .NET and it mentioned this:
Do You Use Declarative Security?
Where possible, it is recommended that you use declarative security instead of imperative security checks. The current implementation of demand provides better performance and support with the security tools that are currently being built to help security audits.
Note that if your security checks are conditional within a method, imperative security is your only option.
Link: http://weblogs.asp.net/sanjeevagarwal/archive/2009/09/09/net-code-performance-tips-part-1.aspx
What does "declarative security" stand for? Can someone give a concrete example?