CodeAccessPermission Class
Overview
Represents a permission that grants access to network resources. This is an abstract class and must be inherited by a specific network permission class.
The CodeAccessPermission class is the base class for all code access security (CAS) permissions that grant access to network resources. It defines the fundamental operations and properties that are common to all network-related permissions.
While CAS is largely deprecated in favor of newer security models and is often disabled by default in modern .NET environments, understanding these concepts can be valuable for working with older codebases or for academic purposes.
Inheritance
Syntax
Constructors
No public constructors are available as this is an abstract class.
Methods
| Name | Description |
|---|---|
| Copy() | Creates and returns an identical copy of the current permission object. |
| Equals(Object) | Determines whether the specified object is equal to the current object. |
| FromXml(SecurityElement) | Reconstructs a security object with a specified state from an XML encoding. |
| GetHashCode() | Serves as the default hash function. |
| Intersect(IPermission) | Creates and returns a new permission that represents the intersection of the current permission and the specified permission. |
| IsDegraded() | Returns a value indicating whether the permission object is degraded. |
| IsFullyEqual(IPermission) | Indicates whether the current permission object is equal to the specified permission object. |
| IsSubsetOf(IPermission) | Determines whether the current permission object is a subset of the specified permission object. |
| ToString() | Returns a string that represents the current object. |
| ToXml() | Returns an XML encoding of the security object. |
| Union(IPermission) | Creates and returns a new permission that represents the union of the current permission and the specified permission. |
Requirements
Namespace: System.Net.Security
Assembly: System.dll (in System.dll)