如何在c#中定义一个文本框数组? [英] how to define an array of textboxes in c#?

查看:36
本文介绍了如何在c#中定义一个文本框数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Windows 应用程序表单上创建文本框时,我无法将其命名为 box[0]、box[1] 等.我这样做的目的是因为我想循环使用它们.

Hi when I create textboxes on Windows Application Form I cannot name it as box[0], box[1] and so on. The purpose why I want to do like this is because I want to use them in a loop.

推荐答案

其实我发现 TextBox[] array = { firstTextBox, secondTextBox }; 也能用!

Actually I found TextBox[] array = { firstTextBox, secondTextBox }; works too!

这篇关于如何在c#中定义一个文本框数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆