如何动态添加同一控件多次?

怎么动态添加同一控件多次?? ?谢谢...[解决办法]int ButtonIndex 0private void button1_Click(object

怎么动态添加同一控件多次?? ?
谢谢...

[解决办法]
int ButtonIndex = 0;
private void button1_Click(object sender, EventArgs e)
{
Button vButton = new Button();
vButton.Parent = this;
vButton.Text = "Zswang " + ButtonIndex;
vButton.Top = vButton.Height * ButtonIndex;
ButtonIndex++;
}