I am changing string array into dictionary collection.
string str = "When everybody is somebody then no one is anybody";
char[] separation = { ' ', '.', ',' };
var splitted=str.Split(separation);
(Absolutely it is not a good design,but i wish to know the logic)
When i build query
var indexed = (from i in Enumerable.Range(1, splitted.Length)
from strn in splitted
select new { i, strn }).ToDictionary(x => x.i, x => x.strn);
I received "Key already found in dictionary"
. I am supplying unique keys as enumerated
values.