RuleSetReference Constructor (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Initializes a new instance of the RuleSetReference class using the name of the RuleSet.

Namespace:   System.Workflow.Activities.Rules
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)

public RuleSetReference(
	string ruleSetName


Type: System.String

The name of the RuleSet that the activity evaluates.

The following code example shows how to create a new instance of the RuleSetReference class using the name of a RuleSet. This code example is part of the Policy SDK Sample from the DiscountPolicyWorkflow.Designer.cs file. For more information, seeAdvanced Policy.

public sealed partial class DiscountPolicyWorkflow
    private void InitializeComponent()
        this.CanModifyActivities = true;
        System.Workflow.Activities.Rules.RuleSetReference rulesetreference1 = new System.Workflow.Activities.Rules.RuleSetReference();
        this.advancedDiscountPolicy = new System.Workflow.Activities.PolicyActivity();
        // advancedDiscountPolicy
        this.advancedDiscountPolicy.Name = "advancedDiscountPolicy";
        rulesetreference1.RuleSetName = "DiscountRuleSet";
        this.advancedDiscountPolicy.RuleSetReference = rulesetreference1;
        // DiscountPolicyWorkflow
        this.Name = "DiscountPolicyWorkflow";
        this.Completed += new System.EventHandler(this.WorkflowCompleted);
        this.CanModifyActivities = false;


    private PolicyActivity advancedDiscountPolicy;

.NET Framework
Available since 3.0
Return to top