string categoryIDList = Convert.ToString(reader["categoryIDList"]);
if (!String.IsNullOrEmpty(categoryIDList))
{
c.CategoryIDList =
new List<int>().AddRange(
categoryIDList
.Split(',')
.Select(s => Convert.ToInt32(s)));
}
The class has a property IList CategoryIDList that I am trying to assign to above.
Error:
Error 1 Cannot implicitly convert type 'void' to 'System.Collections.Generic.IList'
Not sure what the issue is?