NetworkInformationPermission.Copy Method ()

 

Creates and returns an identical copy of this permission.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

public override IPermission Copy()

Return Value

Type: System.Security.IPermission

A NetworkInformationPermission that is identical to the current permission

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

The following example creates copy of a permission object.

System.Net.NetworkInformation.NetworkInformationPermission read = 
    new System.Net.NetworkInformation.NetworkInformationPermission(
        System.Net.NetworkInformation.NetworkInformationAccess.Read);
System.Net.NetworkInformation.NetworkInformationPermission copyPermission =
   (System.Net.NetworkInformation.NetworkInformationPermission) read.Copy();

.NET Framework
Available since 2.0
Return to top
Show: