<p>Say a class </p>

<pre><code>Person  
+Name: string  
+Contacts: List&lt;Person&gt;
</code></pre>

<p>I want to be able to check if a person has a contact with a certain name without having to create a dummy Person instance.</p>

<pre><code>person.Contacts.Contains&lt;string&gt;("aPersonName");
</code></pre>

<p>This should check all persons in the Contacts list if their Name.Equals("aPersonName");
I see that there is a Contains already available, but I don't know where I should implement it's logic.</p>

It's probably easiest to use
Enumerable.Any
:
```
```
return person.Contacts.Any(person => person.Name=="aPersonName");
```
```
Alternatively, project and then contain:
```
```
return person.Select(person => person.Name).Contains("aPersonName");
```
```