Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我们有两个集合:
coll1 = {1,2,3,4,5} coll2 = {3,4,5,6,7,8,9}
如何查找两个集合中包含的元素计数(最佳性能)? 例如上面的结果必须相等3。
3
谢谢,
coll1.Intersect(coll2 ).Count()