我有这段代码将结果输出到文本框
try
{
// Connect to the work item store
TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(
new Uri("xxx"));
WorkItemStore workItemStore = (WorkItemStore)tpc.GetService(typeof(WorkItemStore));
// Run a query.
WorkItemCollection queryResults = workItemStore.Query(richTextBox1.Text);
foreach (WorkItem workItem in queryResults)
{
richTextBox2.Text = string.Join(Environment.NewLine, workItem.AreaPath, workItem.Project);
}
}
catch (Exception exceptionmessage)
{
MessageBox.Show(exceptionmessage.ToString());
}
}
我可以像对待来自 SQL Server 的 SQL 查询一样对待查询结果并将其绑定到数据网格或数据查看器吗?我似乎无法让它工作,我不明白数据是如何从 WIQL/TFS 处理和返回的。