Created
August 18, 2017 02:22
-
-
Save NZSmartie/49d1e9ab5ee26a5b7460bb4f3d17aa1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyClass | |
{ | |
public event EventHandler OnSomeEvent; | |
public void TriggerSomeEvent() | |
{ | |
try | |
{ | |
OnSomeEvent?.Invoke(this, new EventArgs()); | |
} | |
catch(Exception ex) | |
{ | |
// Handle exception things here | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment