Most elegant way to convert string array into a dictionary of strings
Assuming you’re using .NET 3.5, you can turn any sequence (i.e. IEnumerable<T>) into a dictionary: var dictionary = sequence.ToDictionary(item => item.Key, item => item.Value) where Key and Value are the appropriate properties you want to act as the key and value. You can specify just one projection which is used for the key, if the …