NetworkInformationPermission.Copy Method ()

 
System_CAPS_noteNote

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

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: