TaskItem.Priority 属性
设置或获取一个常数,该常数指示任务项的优先级。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
Property Priority As vsTaskPriority
vsTaskPriority Priority { get; set; }
property vsTaskPriority Priority {
vsTaskPriority get ();
void set (vsTaskPriority value);
}
abstract Priority : vsTaskPriority with get, set
function get Priority () : vsTaskPriority
function set Priority (value : vsTaskPriority)
属性值
类型:EnvDTE.vsTaskPriority
一个 vsTaskPriority 常数。
示例
[Visual Basic]
Sub PriorityExample()
' Before running, add a task to the Task List.
Dim win As Window = DTE.Windows.Item(Constants.vsWindowKindTaskList)
Dim TL As TaskList = win.Object
Dim TLItem As TaskItem = TL.TaskItems.Item(1)
Dim msg As String
' List properties of the Task Item.
msg = "TaskItem Category property value: " & TLItem.Category & vbCr
msg = msg & "TaskItem SubCategory property value: " & TLItem.SubCategory & vbCr
msg = msg & "TaskItem Checked property value: " & TLItem.Checked & vbCr
msg = msg & "TaskItem Displayed property value: " & TLItem.Displayed & vbCr
msg = msg & "TaskItem IsSettable property value: " & TLItem.IsSettable(vsTaskListColumn.vsTaskListColumnCheck) & vbCr
msg = msg & "TaskItem Priority property value: " & TLItem.Priority & vbCr
MsgBox(msg)
End Sub
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。