NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

CodeAccessPermission.Intersect

When implemented by a subclass, this method creates and returns a permission that is the intersection of the current permission object and a target permission object.

[Visual Basic]
MustOverride Public Function Intersect( _
   ByVal target As IPermission _
) As IPermission
[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 object to intersect with the current permission object. It must be of the same type as the current permission object.

Return Value

Returns the intersection of the current permission object and the permission specified, which will be either a permission object or a null reference if the intersection is empty.

Exceptions

Exception Type Condition
ArgumentException if target is not a null reference and is not an instance of the same class that this TBD object is an instance of.

Remarks

The intersection of two permission objects is a permission object that describes the operations that are specified by both permissions.

Notes to Implementers: Each non-abstract subclass of the CodeAccessPermission class must implement Intersect, including the code access permissions supplied by the NGWS runtime. If you are implementing your own code access permission class, you must implement this method in the class you derive from CodeAccessPermission.

See Also

CodeAccessPermission Class | CodeAccessPermission Members | System.Security Namespace