<p>I have a List of Foo.</p>

<p>Foo has a string property named Bar.</p>

<p>I'd like to use <strong>LINQ</strong> to get a string[] of <strong>distinct</strong> values for Foo.Bar in List of Foo.</p>

<p>How can I do this?</p>

Try this:
```
```
var distinctFooBars = (from foo in foos
                       select foo.Bar).Distinct().ToArray();
```
```