TaskItem.Enabled 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定值,指出是否啟用 物件。
public:
property bool Enabled { bool get(); void set(bool value); };
public bool Enabled { get; set; }
member this.Enabled : bool with get, set
Public Property Enabled As Boolean
屬性值
true 如果已啟用 物件,則為 ;否則為 false 。
範例
下列範例會列舉工作專案,並啟用 類型 MethodTaskItem 的所有工作。
foreach (TaskItem item in items)
{
if (item is MethodTaskItem)
item.Enabled = true;
}
return items;
}