[Mono-dev] File not found error when using Activator.CreateInstanceFrom()

Jonathan Pryor jonpryor at vt.edu
Mon Dec 20 11:10:15 EST 2010


On Dec 19, 2010, at 4:57 PM, mike wrote:
> For some reason, I
> thought we chose this CreateInstance() approach over the P/Invoke for
> performance reasons.

If you have concerns about P/Invoke performance, you might consider looking into the System.Security.SuppressUnmanagedCodeSecurityAttribute attribute:

	http://msdn.microsoft.com/en-us/library/system.security.suppressunmanagedcodesecurityattribute.aspx

This can help speed up P/Invoke performance by disabling security-related stack walks on .NET.  On Mono I *believe* this won't have an effect, as CAS is disabled by default (as it isn't supported).

 - Jon



More information about the Mono-devel-list mailing list