【发布时间】:2009-10-07 00:33:52
【问题描述】:
string categoryIDList = Convert.ToString(reader["categoryIDList"]);
if (!String.IsNullOrEmpty(categoryIDList))
{
c.CategoryIDList =
new List<int>().AddRange(
categoryIDList
.Split(',')
.Select(s => Convert.ToInt32(s)));
}
该类有一个属性 IList CategoryIDList 我试图分配给上面。
错误:
错误 1 无法将类型“void”隐式转换为“System.Collections.Generic.IList”
不确定是什么问题?
【问题讨论】: