What#39;s the simplest .NET equivalent of a VB6 control array?(VB6 控件数组最简单的 .NET 等价物是什么?)
问题描述
也许我只是对 .NET 还不够了解,但我还没有看到一种令人满意的方法来在 .NET 中轻松实现这个简单的 VB6 代码(假设此代码位于数组 Command1 中包含 N 个 CommandButtons 的表单上() 和数组 Text1()) 中的 N 个文本框:
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 N CommandButtons in array Command1() and N TextBoxes in array Text1()):
我知道这不是很有用的代码,但它展示了在 VB6 中可以轻松使用控件数组.C# 或 VB.NET 中最简单的等价物是什么?
I know it's not very useful code, but it demonstrates the ease with which control arrays can be used in VB6. What is the simplest equivalent in C# or VB.NET?
推荐答案
制作一个通用的文本框列表:
Make a generic list of textboxes:
这篇关于VB6 控件数组最简单的 .NET 等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!