Reputation: 24067
To disable security checks what should I set? SuppressUnmanagedCodeSecurityAttribute
or SuppressUnmanagedCodeSecurity
?
Which of these versions is corrrect?
[DllImport("Native.dll"), SuppressUnmanagedCodeSecurity]
public static extern void Method(...
or
[DllImport("Native.dll"), SuppressUnmanagedCodeSecurityAttribute]
public static extern void Method(...
Upvotes: 1
Views: 1450
Reputation: 77304
Both do the same thing. The class is named SuppressUnmanagedCodeSecurityAttribute
, but when annotating attributes in general, you can omit the suffix Attribute
.
Upvotes: 4