views:

42

answers:

1

If you use reflector to, for example, look at the implementation of the OnMouseEnter method of ButtonBase, it calls IntSecurity.AllWindows.Assert before showing a ToolTip control.

Why?

+2  A: 

Calling Assert instructs the runtime to bypass particular security checks. This increases performance and allows underprivileged code to call methods with CAS permission requirements.

You can find more information on MSDN here.

Seventh Element