C# events are used to resolve the hassles in Delegates. One an easily override Delegate properties and that can eventually lead to errors in the code. To avoid this, C# uses Events and defines wrappers around Delegates.
To use Event, you should define delegate first. Event is a type of Delegate and an example of event can be when a key is pressed.
public delegate voide Demo(String val); public event Test TestEvent;
this.TestEvent += new Demo (DemoData);
A delegate is a reference type variable that holds the reference to a method. The reference can be changed at runtime.
public delegate void Demo(String val);