Skip to content

Instantly share code, notes, and snippets.

@dmitry-osin
Created October 5, 2016 16:00
Show Gist options
  • Save dmitry-osin/37f3c908354da2b67df87380757abbb3 to your computer and use it in GitHub Desktop.
Save dmitry-osin/37f3c908354da2b67df87380757abbb3 to your computer and use it in GitHub Desktop.
// Test class
public class ExampleClass
{
public EventHandler TestEventHandler { get; set; }
}
// Entry point
class Program
{
static void Main(string[] args)
{
var example = new ExampleClass();
example.TestEventHandler += TestEventHandler;
example.TestEventHandler.Invoke(null, null);
}
private static void TestEventHandler(object sender, EventArgs eventArgs)
{
Debug.WriteLine("Guess who? Event");
}
}
// Screenshot debug & breakpoint
http://shot.qip.ru/00R3JU-1wEDEcRoi/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment