CodeAccessPermission.Intersect Method
When implemented by a derived class, creates and returns a permission that is the intersection of the current permission and the specified permission.
[Visual Basic] Public MustOverride Function Intersect( _ ByVal target As IPermission _ ) As IPermission Implements IPermission.Intersect [C#] public abstract IPermission Intersect( IPermission target ); [C++] public: virtual IPermission* Intersect( IPermission* target ) = 0; [JScript] public abstract function Intersect( target : IPermission ) : IPermission;
Parameters
- target
- A permission to intersect with the current permission. It must be of the same type as the current permission.
Return Value
A new permission that represents the intersection of the current permission and the specified permission. This new permission is a null reference (Nothing in Visual Basic) if the intersection is empty.
Implements
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentException | The target parameter is not a null reference (Nothing in Visual Basic) and is not an instance of the same class as the current permission. |
Remarks
The intersection of two permissions is a permission that describes the set of operations they both describe in common. Only a demand that passes both original permissions will pass the intersection.
Notes to Inheritors: You must implement this method in a derived class.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard
See Also
CodeAccessPermission Class | CodeAccessPermission Members | System.Security Namespace