System.Security.SecurityTransparentAttribute Class

Specifies that an assembly cannot cause an elevation of privilege.

See Also: SecurityTransparentAttribute Members


[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=false, Inherited=false)]
public sealed class SecurityTransparentAttribute : Attribute


Transparent assemblies can be accessed from partially trusted code and cannot expose access to any protected resources or functionality. Code in the assembly is not allowed to suppress code access security checks and cannot cause an elevation of privilege.


Transparency is enforced by the just-in-time compiler, not by the security infrastructure code. Applying this attribute to an assembly allows the assembly to access only transparent and security-safe-critical types and members regardless of its permission set, including full trust. Transparent code that accesses a security-critical type or member results in a MethodAccessException being thrown.


Namespace: System.Security
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions:,
Since: .NET 2.0