ReSharper的提供我使这个局部变量,并写入“访问修改关闭”为什么要局部变量?
if (filter != null)
{
if (filter.CityId != 0)
{
ads = ads.Where(x => x.Ad.CityId == filter.CityId);
}
if (filter.BusinesCategoryId != 0)
{
ads = ads.Where(x => x.BusinessCategoryId == filter.BusinesCategoryId);
}
}
为什么局部变量过滤器?
哪个局部变量'ads'? – Tigran 2012-04-12 05:32:04