谁能向我解释一下这个错误是什么以及为什么我得到它?我试图更改f
变量的名称,但它没有用。
public ActionResult Index(string SortOrder, string CurrentFilter, string SearchString, int? page)
{
ViewBag.CurrentSort = SortOrder;
ViewBag.NameSortParm = string.IsNullOrEmpty(SortOrder) ? "Tillverkning desc" : "";
ViewBag.DateSortParm = SortOrder == "HireDate" ? "HireDatedesc" : "HireDate";
conn.Open();
ProductionOrderList myList = new ProductionOrderList();
myList = ProductionOrderReg.GetProductionOrders(conn, new Guid("288937bcc-6uif-485a-anm9-fadfq1234039d"));
if (!string.IsNullOrEmpty(SearchString))
{
// here on myList get red line
myList = myList.Where( myList => myList .ProductionOrderNo.ToUpper().Contains(SearchString.ToUpper()));
}
}