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

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -