.NET Framework Standard Library Annotated Reference, Volume 1: Base Class Library and Extended Numerics Library
by Brad Abrams
System.Security.Permissions
A permission is an object that specifies security rules for access to a protected resource. Permissions come in two flavors, programmatic and declarative. In the former case, the permission class (e.g., EnvironmentPermission), derives from CodeAccessPermission. You write code that creates these objects, sets their properties, and calls their methods in the usual way. You will need this technique when your security operations can vary dynamically at runtime.
Alternatively, many programmers like to specify their permissions declaratively by marking their code with attributes. The attributes tell the CLR which security permissions the code needs to do its job, in the same way that calling methods on a permission object ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access