I have a list of string values that I want add to a hashtable or other array that can be accessed by key/index but cannot implement it. I have this working how I want but its ugly
List<string> valueList = new List<string>();
valueList.Add("1");
valueList.Add("2");
valueList.Add("3");
Hashtable p = new Hashtable();
valueList.ForEach(delegate(string f) { p.Add(valueList.FindIndex(v => v == f), f); });
EDIT: After James reminded me that a List will return values by index I went with a List and this is what I have ended up with
valueList.ForEach(f => sequenceList.Add(int.Parse(f)));