If I have access only keys from a Dictionary<TKey, TValue>
what is better to use:
Dictionary<TKey, TValue>.ForEach(pair => action(pair.Key))
or
Dictionary<TKey, TValue>.Keys.ForEach(key => action(key))
Which method is more 'best-practice' ? Speed in both cases I think seems to be very similar.