Share via


Policy Constructor

Initializes a new instance of the Policy class.

Namespace:  Microsoft.SqlServer.Management.Dmf
Assembly:  Microsoft.SqlServer.Dmf (in Microsoft.SqlServer.Dmf.dll)

Syntax

'Declaration
Public Sub New
'Usage

Dim instance As New Policy()
public Policy()
public:
Policy()
new : unit -> Policy
public function Policy()

Remarks

The default constructor initializes any fields to their default values.

Examples

C#

Policy p = new Policy(ps, policyName);
p.AutomatedPolicyEvaluationMode = execMode;
p.Condition = condition.Name;
p.ScheduleUid = schedule.ScheduleUid;
if (execMode != AutomatedPolicyEvaluationMode.None) p.Enabled = true;
p.Create();