Policy 建構函式
Initializes a new instance of the Policy class.
命名空間: Microsoft.SqlServer.Management.Dmf
組件: Microsoft.SqlServer.Dmf (在 Microsoft.SqlServer.Dmf.dll 中)
語法
'宣告
Public Sub New
'用途
Dim instance As New Policy()
public Policy()
public:
Policy()
new : unit -> Policy
public function Policy()
備註
預設建構函式會初始化任何欄位至其預設值。
範例
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();