-3
Items = (from myRow in table.AsEnumerable()
         where myRow.Field<string>("RelatedContactName") == groupName
         select myRow)

Items 对象的属性。

public class Item
{
     public List<Item> Items
     {
         get;
         set;
     }
}
4

2 回答 2

1

您需要在select子句中创建一个新对象:

select new Item { ... }
于 2013-08-14T22:35:57.230 回答
-1
Items = (from myRow in table.AsEnumerable()
     where myRow.Field<string>("RelatedContactName") == groupName
     select myRow).ToList();
于 2013-08-14T22:46:45.167 回答