NamedPermissionSet.Copy NamedPermissionSet.Copy NamedPermissionSet.Copy NamedPermissionSet.Copy Method

Definition

Creates an equivalent copy of the named permission set.

Overloads

Copy() Copy() Copy() Copy()

Creates a permission set copy from a named permission set.

Copy(String) Copy(String) Copy(String) Copy(String)

Creates a copy of the named permission set with a different name but the same permissions.

Copy() Copy() Copy() Copy()

Creates a permission set copy from a named permission set.

public:
 override System::Security::PermissionSet ^ Copy();
public override System.Security.PermissionSet Copy ();
override this.Copy : unit -> System.Security.PermissionSet
Public Overrides Function Copy () As PermissionSet

Returns

A permission set that is a copy of the permissions in the named permission set.

Examples

The following code example shows the use of the Copy method to create a copy of the current NamedPermissionSet. This code example is part of a larger example provided for the NamedPermissionSet class.

Copy(String) Copy(String) Copy(String) Copy(String)

Creates a copy of the named permission set with a different name but the same permissions.

public:
 System::Security::NamedPermissionSet ^ Copy(System::String ^ name);
public System.Security.NamedPermissionSet Copy (string name);
override this.Copy : string -> System.Security.NamedPermissionSet
Public Function Copy (name As String) As NamedPermissionSet

Parameters

name
String String String String

The name for the new named permission set.

Returns

A copy of the named permission set with the new name.

Exceptions

The name parameter is null or is an empty string ("").

Applies to