NetworkInformationPermission.Copy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates and returns an identical copy of this permission.
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
Returns
A NetworkInformationPermission that is identical to the current permission.
Examples
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());
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)
Remarks
A copy of a permission represents the same access to resources as the original permission.
Applies to
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.