NetworkInformationPermission.Copy Yöntem

Tanım

Bu iznin özdeş bir kopyasını oluşturur ve döndürür.

public:
 override System::Security::IPermission ^ Copy();
public override System.Security.IPermission Copy ();
override this.Copy : unit -> System.Security.IPermission
Public Overrides Function Copy () As IPermission

Döndürülenler

NetworkInformationPermission Geçerli izinle aynı olan bir.

Örnekler

Aşağıdaki örnek, bir izin nesnesinin kopyasını oluşturur.

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());
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();
Dim read As New System.Net.NetworkInformation.NetworkInformationPermission( _ 
    System.Net.NetworkInformation.NetworkInformationAccess.Read)
Dim copyPermission As System.Net.NetworkInformation.NetworkInformationPermission = _
    CType(read.Copy(), System.Net.NetworkInformation.NetworkInformationPermission)

Açıklamalar

İzin kopyası, kaynaklara özgün izinle aynı erişimi temsil eder.

Şunlara uygulanır