How can I extend 开发者_Python百科(or overload) Contains method with some custom property in a collection ?
I want that delegate to compare the object with just a property of it and returns true if there is an object with the same value of a property.
return myCollection.Any(myCustomObject => myCustomObject.SomeProperty.Equals(valueToFind));
精彩评论