What's the simplest .NET equivalent of a VB6 control array?

后端 未结 9 1658
时光取名叫无心
时光取名叫无心 2020-12-11 03:42

Maybe I just don\'t know .NET well enough yet, but I have yet to see a satisfactory way to implement this simple VB6 code easily in .NET (assume this code is on a form with

9条回答
  •  失恋的感觉
    2020-12-11 04:02

    Make an array of controls.

    TextBox[] textboxes = new TextBox[] {
        textBox1,
        textBox2,
        textBox3
    };
    

提交回复
热议问题