Question: I have an array of Customer[] objects, and I want to use it to create a Dictionary<Customer, string>. What is the easiest way to examine the array for duplicates before I load the Dictionary? I want to avoid "ArgumentException: An item with the same key has already been added". Thanks.

Answer: 
The most efficient way of doing that, from BOTH PERFORMANCE and CODE points of view, is this:

```
dict[key] = value

```

This way the exception mentioned by you will never get thrown, and the key lookup will not happen twice
Why not this??

```
Customers.Distinct.ToDictionary(o=>o, GenerateString(o));

```