using System;using System.Drawing;using System.Windows.Forms;public delegate void StartDelegate();class EventIntr : Form{ public event StartDelegate StartEvent; public EventIntr() { Button clickMe = new Button(); clickMe.Parent = this; clickMe.Text = "Click Me"; clickMe.Location = new Point( (ClientSize.Width - clickMe.Width) /2, (ClientSize.Height - clickMe.Height)/2); clickMe.Click += new EventHandler(OnClickMeClicked); StartEvent += new StartDelegate(OnStartEvent); StartEvent(); } public void OnClickMeClicked(object sender, EventArgs ea) { MessageBox.Show("You Clicked My Button!"); } public void OnStartEvent() { MessageBox.Show("It Just Started!"); } static void Main(string[] args) { Application.Run(new EventIntr()); }}