using System class PlayGround static void Main string args Console Wri

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
class PlayGround
{
static void Main(string[] args)
{
Console.WriteLine("Hello, world");
PlayGround pg = new PlayGround();
}
public PlayGround()
{
this.CountdownCompleted += new EventHandler(this.Completed);
this.OnCountdownCompleted(new EventArgs());
}
public event EventHandler CountdownCompleted;
protected virtual void OnCountdownCompleted(EventArgs args)
{
if (CountdownCompleted != null) CountdownCompleted(this, args);
}
public void Completed(object sender, EventArgs args)
{
Console.WriteLine("object is {0} and args is {1}", sender, args);
}
}