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 _
public UnionCodeGroup(
   IMembershipCondition membershipCondition,
 PolicyStatement policy
public: UnionCodeGroup(
   IMembershipCondition* membershipCondition,
 PolicyStatement* policy
public function UnionCodeGroup(
   membershipCondition : IMembershipCondition,
 policy : PolicyStatement


A membership condition that tests evidence to determine whether this code group applies 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.


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


The type of the policy parameter is not valid.


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.


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