이런식으로 말이죠?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("LabelText", typeof(string));
dt.Rows.Add(new string[] { "Text1" });
dt.Rows.Add(new string[] { "Text2" });
dt.Rows.Add(new string[] { "Text3" });
dt.Rows.Add(new string[] { "Text4" });
dt.Rows.Add(new string[] { "Text5" });
SetData(dt);
}
private void SetData(DataTable dt)
{
for (int i = 0; i < dt.Rows.Count;i++ )
{
DataRow dtrow = dt.Rows[i];
System.Windows.Forms.Label lbl = new System.Windows.Forms.Label();
lbl.AutoSize = true;
lbl.Location = new Point(30, 30 + i * 30);
lbl.Name = "label"+i.ToString();
lbl.Size = new System.Drawing.Size(38, 12);
lbl.TabIndex = i;
lbl.Text = dtrow[0].ToString();
this.Controls.Add(lbl);
}
}
}
}
좋은 하루 되세요.