Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 TFS api 2010、2012 删除附件集合中的附件。我只知道 wi.Attachments.Clear(); 删除所有附件。
这条路怎么样?我尝试并成功了。
//wi is a WorkItem wi.Open(); for (int i = wi.Attachments.Count - 1; i >= 0; i--) { if (wi.Attachments[i].Name == "Attach1.txt") wi.Attachments.RemoveAt(i); } wi.Save(); wi.Close();