DataProtectionPermission.Intersect(IPermission) 메서드

정의

현재 사용 권한 및 지정된 사용 권한의 공통 권한을 만들어 반환합니다.

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

매개 변수

target
IPermission

현재 사용 권한과 공통되는 사용 권한입니다. 현재 사용 권한과 동일한 형식이어야 합니다.

반환

IPermission

현재 사용 권한과 지정된 사용 권한의 교집합에 해당하는 권한을 나타내는 새 사용 권한입니다. 교집합이 비어 있으면 새 사용 권한은 null입니다.

예외

targetnull 가 아니며 현재 사용 권한과 동일한 유형의 사용 권한을 지정하지 않습니다.

예제

다음 코드 예제에서는 메서드의 사용을 보여 있습니다 Intersect . 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataProtectionPermission 클래스입니다.

Console::WriteLine( "Creating the intersection of the second and "
"first permissions." );
sp4 = dynamic_cast<DataProtectionPermission^>(sp2->Intersect( sp1 ));
Console::WriteLine( "The value of the Flags property is: {0}", sp4->Flags );
Console.WriteLine("Creating the intersection of the second and " +
    "first permissions.");
sp4 = (DataProtectionPermission)sp2.Intersect(sp1);
Console.WriteLine("The value of the Flags property is: " +
    sp4.Flags.ToString());
Console.WriteLine("Creating the intersection of the second and " + "first permissions.")
sp4 = CType(sp2.Intersect(sp1), DataProtectionPermission)
Console.WriteLine("The value of the Flags property is: " + sp4.Flags.ToString())

설명

두 권한의 교차점은 둘 다 공통적으로 설명하는 작업 집합을 설명하는 권한입니다. 두 개별 권한을 모두 전달하는 요청만 교차를 통과합니다.

적용 대상