I have a method that returns an IEnumerable>, but some of the callers require the result of the method to be a dicti
IEnumerable>
If you're using .NET 3.5 or .NET 4, it's easy to create the dictionary using LINQ:
Dictionary result = target.GetComponents() .ToDictionary(x => x.Key, x => x.Value);
There's no such thing as an IEnumerable but a KeyValuePair is fine.
IEnumerable
KeyValuePair