This documentation is archived and is not being maintained.

UnionCodeGroup Constructor

Initializes a new instance of the UnionCodeGroup class.

[Visual Basic]
Public Sub New( _
   ByVal membershipCondition As IMembershipCondition, _
   ByVal policy As PolicyStatement _
)
[C#]
public UnionCodeGroup(
   IMembershipCondition membershipCondition,
 PolicyStatement policy
);
[C++]
public: UnionCodeGroup(
   IMembershipCondition* membershipCondition,
 PolicyStatement* policy
);
[JScript]
public function UnionCodeGroup(
   membershipCondition : IMembershipCondition,
 policy : PolicyStatement
);

Parameters

membershipCondition
A membership condition that tests evidence to determine whether this code group applies policy.
policy
The policy statement for the code group in the form of a permission set and attributes to grant code that matches the membership condition.

Exceptions

Exception Type Condition
ArgumentException The type of the membershipCondition parameter is not valid.

-or-

The type of the policy parameter is not valid.

Remarks

This constructor creates a basic code group and should be called from the constructors of custom code groups. You can add child code groups using the AddChild method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

UnionCodeGroup Class | UnionCodeGroup Members | System.Security.Policy Namespace

Show: