【发布时间】:2010-03-17 16:16:16
【问题描述】:
它有一个属性: 字符串代码 和其他 10 个。
常用代码是字符串列表(string[]) 汽车汽车列表(汽车[]) filtersListOfCars 是列表。
for (int index = 0; index < cars.Length; index++)
{
Car car = cars[index];
if (commonCodes.Contains(car.Code))
{
filteredListOfCars.Add(car);
}
}
很遗憾,这个方法执行的时间太长了。
我有大约 5 万条记录
如何缩短执行时间??
【问题讨论】:
标签: c# performance