c# object list contains object code example
Example 1: check if list of objects contains value c#
bool contains = pricePublicList.Any(p => p.Size == 200);
Example 2: java list contains object with property
boolean found = list.stream()
.anyMatch(p -> p.name.equals(personName));