NetworkInformationPermission::Copy Method ()

 

Creates and returns an identical copy of this permission.

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

public:
virtual IPermission^ Copy() override

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 = gcnew System::Net::NetworkInformation::NetworkInformationPermission( System::Net::NetworkInformation::NetworkInformationAccess::Read );

System::Net::NetworkInformation::NetworkInformationPermission^ copyPermission = dynamic_cast<System::Net::NetworkInformation::NetworkInformationPermission^>(read->Copy());

.NET Framework
Available since 2.0
Return to top
Show: