Form1
, the Code Editor for Form1
as shown below will appear.
The top of the Code Editor consists of a list of objects such as Form
and their associated events or procedures such as Load
.
|
Form1_Load
:
this.show( )
statement.
label1.Text
displays the output on the label.
using System; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { public Form1( ) { InitializeComponent( ); } private void Form1_Load( object sender, EventArgs e ) { this.Show( ); label1.Text = "Welcome to C#!"; } } }
InitializeComponent
loads the compiled page of a component.
Just leave it there.