Kod ile label oluşturma C#


** Form1 yüklendiğinde belirtilen boyutta , belirtilen koordinata label oluşturulur.


Kod:
using System;


using System.Collections.Generic;


using System.ComponentModel;


using System.Data;


using System.Drawing;


using System.Linq;


using System.Text;


using System.Windows.Forms;


namespace kodla_olusturulan_butona_islem_yaptırma


{


public partial class Form1 : Form


{


public Form1()


{


InitializeComponent();


}


private void Form1_Load(object sender, EventArgs e)


{
Label label = new Label();
label.Top = 50;
label.Left = 70;
label.Width = 100;
label.Text = "label1";


this.Controls.Add(label);


}


}


}