I’m trying to define 10 panels in my code, but absolutely do not want to do
public panel1();
public panel2();
etc....
and a quick google search tells me macros are not available in c#. Is there some kind of array I can define to use in place of a macro, or some other way I could handle this ?
Your question is not too clear; but this is how you would define an array of Panels in C#:
You can use an initializer expression to fill in the panels:
It is more likely that you want to loop over something and have some logic create the array – perhaps in a loop or as a LINQ expression, for instance: