【发布时间】:2011-10-22 06:38:29
【问题描述】:
我有以下代码:
public class CategoryNavItem
{
public int ID { get; set; }
public string Name { get; set; }
public string Icon { get; set; }
public CategoryNavItem(int CatID, string CatName, string CatIcon)
{
ID = CatID;
Name = CatName;
Icon = CatIcon;
}
}
public static List<Lite.CategoryNavItem> getMenuNav(int CatID)
{
List<Lite.CategoryNavItem> NavItems = new List<Lite.CategoryNavItem>();
-- Snipped code --
return NavItems.Reverse();
}
但我收到以下错误:
无法将类型“void”隐式转换为
'System.Collections.Generic.List<Lite.CategoryNavItem>'
任何想法为什么会这样?
【问题讨论】: