【发布时间】:2014-08-19 15:34:28
【问题描述】:
我有两个 IList。
IList<CustomClassOne> 类型的用户和
IList<CustomClassTwo> 类型的联系人。
这两个类都有一个唯一的 ID。我需要使用 CustomClassTwo 的属性“Info”填写 CustomClassOne 的属性“Description”。
foreach (CustomClassOne user in users )
{
if (!string.IsNullOrEmpty(user.Description))
{
long id = user.ID;
string desc = user.Description;
var temp = contacts.Select(p => p.ID = id);
...
...
}
else
continue;
}
【问题讨论】:
标签: c# generics collections ilist