I have some web browsers on my C # application, I have 10. webBrowser0, webBrowser1, webBrowser2 etc.
In any case, I run a loop to count every screen, to place a web browser on every screen that I have, all this is done easily, but in my loop, if there is something like this.
for (index = 0; index <= totalScreens; index++)
{
if (index == 0)
{
webBrowser0.Width = x;
webBrowser0.Height = x;
}
if (index == 1)
{
webBrowser1.Width = x;
webBrowser1.Height = x;
}
}
As you can see, I am increasing the code quite a lot, so if I could link to webBrowser {index}, that would be fine, but that of course does not work.
source
share