Export (0) Print
Expand All

CodeAccessPermission.Copy Method

When implemented by a derived class, creates and returns an identical copy of the current permission object.

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)

public abstract IPermission Copy()

Return Value

Type: System.Security.IPermission
A copy of the current permission object.

Implements

IPermission.Copy()

A copy of a permission object represents the same access to resources as the original permission object.

Notes to Inheritors

You must override this method in a derived class.

The following code example shows an override of the Copy method. This code example is part of a larger example provided for the CodeAccessPermission class.

public override IPermission Copy()
{
    string name = m_Name;
    return new  NameIdPermission( name );
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft