Meine Frage ist im Prinzip sehr einfach, jedoch schwer zu umschreiben

.
Beispiel:
C#-Quelltext
1: 2: 3: 4:
| for(int i = 0; i <= 50; i++) { this.pictureBox[i].Location = new System.Drawing.Point(0,0); } |
sehr simples beispiel ich möchte mehre pictureboxen bewegen.
Und um nicht z.b. 50 mal zu schreiben:
C#-Quelltext
1: 2: 3:
| this.pictureBox1.Location = new System.Drawing.Point(0,0); this.pictureBox2.Location = new System.Drawing.Point(0,0); .... |
würde ich das gerne so wie in den Beispiel oben machen, blos die pictureBox ist ja keine Array.
In einer anderen Sprache gingt so was in so ^^: pictureBox&i&
Das & ist sich im Pinzip weg zu denken, so das dann nur da stehen würde:
C#-Quelltext
1: 2: 3:
| pictureBox1 pictureBox2 ... |
statt
C#-Quelltext
1: 2: 3:
| pictureBox&1& pictureBox&2& ... |
Ich hoffe ich konnte das Problem ausreichend schildern.
mmfg. TheLol
Moderiert von
Christian S.: C#-Tags hinzugefügt
Moderiert von
Christian S.: Topic aus C# - Die Sprache verschoben am Mi 13.08.2008 um 21:17