It can be done, but it's a little silly IMO
Dictionary<string,string> dictionary = new Dictionary<string, string>(); Dictionary<string, string>.Enumerator enumerator = dictionary.GetEnumerator(); for (int i = 0; i < attributeValues.Count;i++ ) { KeyValuePair<string, string> current = enumerator.Current;
The only thing that comes out of this is the (rather useless) index, and if that is the actual goal, you like something best:
int currentIndex = 0; foreach (KeyValuePair<string, string> keyValuePair in dictionary) {
Laustn
source share