J
Jessica
Hi,
I am new to C# and would like to get some help. I tried creating an
array of comboboxes in my form (the same way as if I am initializing
an array of built-in types) but got this error: "Cannot apply indexing
with [] to an expression of type 'System.Windows.Forms.ComboBox'"
This is what I did:
In declaration:
private System.Windows.Forms.ComboBox[] combos;
Then later I initialize it:
int num_combo = 3;
this.combos = new System.Windows.Forms.ComboBox[num_combo];
for (int i = 0; i < num_combo; i++)
this.combos.Location = ....
Thanks for your help!
Jessica
I am new to C# and would like to get some help. I tried creating an
array of comboboxes in my form (the same way as if I am initializing
an array of built-in types) but got this error: "Cannot apply indexing
with [] to an expression of type 'System.Windows.Forms.ComboBox'"
This is what I did:
In declaration:
private System.Windows.Forms.ComboBox[] combos;
Then later I initialize it:
int num_combo = 3;
this.combos = new System.Windows.Forms.ComboBox[num_combo];
for (int i = 0; i < num_combo; i++)
this.combos.Location = ....
Thanks for your help!
Jessica