public bool HasItemsFromPropertySet(InfoItemPropertySet propertySet, CompositeInfoItem itemRemoved)
{
var itemAndSubItems = new InfoItemCollection();
if (itemRemoved != null)
{
itemAndSubItems.Add(itemRemoved);
//foreach (InfoItem item in itemRemoved.AllDescendants)
itemAndSubItems.AddRange(itemRemoved.AllDescendants);
}
return AllItems.AsParallel().Any(item => item.PropertySet == propertySet && !itemAndSubItems.Contains(item));
}
Trên trong mã của tôi, tôi sử dụng AsParallel(). Bất kỳ() Làm thế nào tôi có thể lấy chủ đề ID của thread được tạo ra bởi rằng AsParellel.Any() ...Làm thế nào để có được Id thread trong C#
Tại sao bạn muốn biết điều đó? – svick