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
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา