I have a foreach loop that declares a variable I never use, but I don’t know how to get around it.
foreach (string i in stringCollection){
some other stuff
}
I never use “i” – but I need an iterator in the loop. So how do I get rid of this error?
Warning is reasonable. You don’t need
foreachat all. Looks like you try to loop times equal to size of collection. You should usefor: