I’ve finally managed to reproduce a very elusive bug. I have Visual Studio attached to the process. In order to further debug it, I need to perform the same assignment on roughly 500 elements in a collection, something a bit like this:
for (int i = 0; i < coll.Length; i++)
coll[i].Something = coll[i].Other;
for
isn’t legal in the immediate window, however. Neither is pasting several statements in one go. Is there a way of doing this that doesn’t involve messing around with AutoHotkey and the like?
I don't think it is a good idea to do actions like that in the immediate window - you may want to reproduce the bug more than once, so you need that statement above over and over again. Better try to create an automatic test which provides the statement above as part of the test data preparation.