日期:2014-05-17 浏览次数:20709 次
private void button1_Click(object sender, EventArgs e)
{
string[] radioButtonList = new string[] { "A", "B", "C", "D", "E", "F", "G" };
for (int i = 0; i < radioButtonList.Length; i++)
{
if (this.Controls[radioButtonList[i]] == null)
{
RadioButton radioButton = new RadioButton();
radioButton.Name = radioButtonList[i];
radioButton.Text = radioButtonList[i];
radioButton.Width = 50;
radioButton.Location = new Point(100, 100 + i * 20);