You are not getting the idea. Dictionaries are used for speed, yes. But for speed of what? The speed of finding a value by unique key, the
computational time complexity of this search is O(1), that's is, it
asymptotically does not depend on the number of items.
Please see:
http://en.wikipedia.org/wiki/Computational_complexity_theory[
^],
http://en.wikipedia.org/wiki/Communication_complexity[
^],
http://en.wikipedia.org/wiki/Big_O_notation[
^].
If you simply read the lines of a file, you can use them as vales, as keys, but not as key-value pairs used in dictionary. And if your keys and values are the same, it gives you nothing, because if you know they are the same and have a key, why looking for a value? (However, it will guarantee key uniqueness, but for this purpose, you should use the class
System.Collections.Generic.HashSet<T>
.)
This way, your question
simply makes no sense. If you explain what are you going to do with a dictionary (first of all, to yourself), I would gladly help. :-)
—SA