PermissionSet Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the PermissionSet class.
Overloads
PermissionSet(PermissionState) |
Initializes a new instance of the PermissionSet class with the specified PermissionState. |
PermissionSet(PermissionSet) |
Initializes a new instance of the PermissionSet class with initial values taken from the |
PermissionSet(PermissionState)
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
Initializes a new instance of the PermissionSet class with the specified PermissionState.
public:
PermissionSet(System::Security::Permissions::PermissionState state);
public PermissionSet(System.Security.Permissions.PermissionState state);
new System.Security.PermissionSet : System.Security.Permissions.PermissionState -> System.Security.PermissionSet
Public Sub New (state As PermissionState)
Parameters
- state
- PermissionState
One of the enumeration values that specifies the permission set's access to resources.
Exceptions
The state
parameter is not a valid PermissionState.
Remarks
The Unrestricted
state allows all permissions that implement the IUnrestrictedPermission interface, while None
allows no permissions.
Use AddPermission on an empty PermissionSet to define the set in greater detail.
Applies to
PermissionSet(PermissionSet)
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
- Source:
- PermissionSet.cs
Initializes a new instance of the PermissionSet class with initial values taken from the permSet
parameter.
public:
PermissionSet(System::Security::PermissionSet ^ permSet);
public PermissionSet(System.Security.PermissionSet? permSet);
public PermissionSet(System.Security.PermissionSet permSet);
new System.Security.PermissionSet : System.Security.PermissionSet -> System.Security.PermissionSet
Public Sub New (permSet As PermissionSet)
Parameters
- permSet
- PermissionSet
The set from which to take the value of the new PermissionSet, or null
to create an empty PermissionSet.
Remarks
The new PermissionSet contains copies of the permissions contained in the specified PermissionSet.
Note
This is equivalent to Copy when the permSet
parameter is not null
.