gpt4 book ai didi

vb.net - 如何创建带循环的 var (例如 : Dim a1, a2,a3 带循环)

转载 作者:行者123 更新时间:2023-12-02 01:21:46 28 4
gpt4 key购买 nike

Dim count As Integer
For count = 1 To 10 Step 1
Dim But+count As New Button
myButton+count.Width = 100*count
myButton+count.Height = 20*count
myButton+count.Top = 50 *count
myButton+count.Left = 50*count
Me.Controls.Add(myButton+count)
Next

Dim But+count As New Button => 如何使其工作

最佳答案

如何创建一个数组并在循环的每次迭代的“第i”位置实例化该项目。它不会是 a1、a2、a3、...;但它会是 a[1], a[2], a[3],....

关于vb.net - 如何创建带循环的 var (例如 : Dim a1, a2,a3 带循环),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3299391/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com