I am trying to get values from a list. In the result I need the index of the value in the resulting list also. I dont have any idea how to get it. Can someone get me some ideas. Following is the code which i use.
List<string> Lst1 = new List<string>();
Lst1.Add("a");
Lst1.Add("ab");
Lst1.Add("c");
Lst1.Add("d");
List<string> result = Lst1.Select(x => x.Substring(0, 1)).ToList();
Dictionaryresult. Please edit the question so that it's clear what you're asking.