CodeAccessPermission::Copy Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

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)

virtual IPermission^ Copy() abstract

Return Value

Type: System.Security::IPermission^

A copy of the current permission object.

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.

   virtual IPermission^ Copy() override
      String^ name = m_Name;
      return gcnew NameIdPermission( name );

.NET Framework
Available since 1.1
Return to top