c# - Use ListForEach to add element to HashTable - Stack Overflow
Try this:
Although, there's really no reason not to use avalueList.ForEach(x => htable.Add(valueList.FindIndex(y => y == x), x));
for
here
for(var index =0; index < valueList.Count; index++){ htable.Add(index, valueList[index]);}
No comments:
Post a Comment