c# - should I just set SuppressUnmanagedCodeSecurity for maximum performance? -


am correct if need maximum performance, , have trusted library should set suppressunmanagedcodesecurity attribute dll imports have?

i.e. convert such import:

    [dllimport("srl.dll", charset = charset.ansi)]     private static extern string errormsg(int errcode); 

to such import:

    [dllimport("srl.dll", charset = charset.ansi), suppressunmanagedcodesecurity]     private static extern string errormsg(int errcode); 

everywhere.

are there reasons not set suppressunmanagedcodesecurity?


Comments

Popular posts from this blog

How can I fetch data from a web server in an android application? -

Change php variable from jquery value using ajax (same page) -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -