for(var i=0; i< 10000; i++){
((IDictionary)resultCollection).Add(key, value);
}
In the code above, I am casting resultCollection(which is of type ICollection) to IDictionary. It is in for loop. Does it affect performance if it is done in loop(which will loop several thousand times)?