public static void Main()
Console.WriteLine("Hello World");
if (foo.onEvent.GetInvocationList() == null)
Console.WriteLine("Invokation list empty");
foo.OnEvent += new MyFunc(Lol);
Delegate[] delegates = foo.onEvent.GetInvocationList();
foreach (Delegate del in delegates)
Console.WriteLine(del.ToString());
foo.OnEvent -= new MyFunc(Lol);
public delegate void MyFunc();
public event MyFunc OnEvent
Console.WriteLine("Action added to the invokation list");
Console.WriteLine("Action removed from the invokation list");