i have this code:
List<T> apps = getApps();
List<int> ids;
List<SelectListItem> dropdown = apps.ConvertAll(c => new SelectListItem
{
Selected = ids.Contains(c.Id),
Text = c.Name,
Value = c.Id.ToString()
}).ToList();
ids.Contains
seems to always return false even though the numbers do match
any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…