I want to know the details of this two styles of iterating Dictionary collections in C#:
Dictionary xydic = new Dictionary
Values is not creating a List, no. It's not even pulling the entire set of values into a separate data structure. All it's doing is creating an enumerator that can iterate over the values. It's doing exactly the same thing that happens when you iterate the dictionary directly; the difference is that instead of constructing a KeyValuePair object for each pair of objects, its only giving you one half of the pair. Other than that, the iteration process is the same.