Skip to main content

If you want to use fora for loop, you can do thisas below:

var keyList=new List<string>(dictionary.Keys); for (int i = 0; i < keyList.Count; i++) {   var key= keyList[i];   var value = dictionary[key];  } 

If you want to use for loop, you can do this:

var keyList=new List<string>(dictionary.Keys); for (int i = 0; i < keyList.Count; i++) { var key= keyList[i]; var value = dictionary[key];  } 

If you want to use a for loop, you can do as below:

var keyList=new List<string>(dictionary.Keys); for (int i = 0; i < keyList.Count; i++) {   var key= keyList[i];   var value = dictionary[key]; } 
deleted 66 characters in body
Source Link
Seçkin
  • 2.8k
  • 4
  • 30
  • 37

If you want to use for loop, you can do this:

 var keyList=new List<string>(dictionary.Keys);  for (int i = 0; i < keyList.Count; i++)  {   var key= keyList[i];   var value = dictionary[key];   } 

If you want to use for loop, you can do this

 var keyList=new List<string>(dictionary.Keys);  for (int i = 0; i < keyList.Count; i++)  {   var key= keyList[i];   var value = dictionary[key];   } 

If you want to use for loop, you can do this:

var keyList=new List<string>(dictionary.Keys); for (int i = 0; i < keyList.Count; i++) { var key= keyList[i]; var value = dictionary[key]; } 
Source Link
Seçkin
  • 2.8k
  • 4
  • 30
  • 37

If you want to use for loop, you can do this

 var keyList=new List<string>(dictionary.Keys); for (int i = 0; i < keyList.Count; i++) { var key= keyList[i]; var value = dictionary[key]; }