鉴于对象的大量集合,以下是否存在性能差异?
Collection.Contains:
myCollection.Contains(myElement)
Enumerable.Any:
myCollection.Any(currentElement => currentElement == myElement)
c# linq performance benchmarking
benchmarking ×1
c# ×1
linq ×1
performance ×1