An operator which checks if a collection contains at least one object matching a specific criteria.
public sealed class ContainsOperator : AggregateOperand
Public NotInheritable Class ContainsOperator Inherits AggregateOperand
The ContainsOperator operator can be used to filter the contents of the XPCollection.
This sample code selects Person objects that contain at least one object in their Addresses collection property with the City property set to "Chicago"
The image below shows the result:
xpCollection1.Filter = new ContainsOperator("Addresses", new BinaryOperator("City", "Chicago")); //or xpCollection1.Filter = CriteriaOperator.Parse("[Addresses][[City] = ?]", "Chicago");