【发布时间】:2014-01-27 08:11:03
【问题描述】:
我在尝试检查两个列表中的重复项时遇到了一些问题。我要做的是检查 distSPUItem 是否在 prodSubstitute 列表中包含 ID,然后执行某些操作。代码如下:
List<ProductPacking> prodSubstitute = new List<ProductPacking>();
List<DistributionStandardPackingUnitItems> distSPUItem = new List<DistributionStandardPackingUnitItems>();
for (int count = 0; count < prodSubstitute.Count; count++)
{
if (!distSPUItem.Contains(prodSubstitute[count].id))
{
//Perform something here
}
}
但是它告诉我最好的重载方法。包含的参数无效。任何指南?提前致谢。
【问题讨论】:
-
这不是完整的错误信息。最好的超载是什么?
-
它标记了哪种方法?