/null-safe-event-raising.vb Secret
Created
February 1, 2019 23:18
Star
You must be signed in to star a gist
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
' You don't have to write this: | |
If PropertyChangedEvent IsNot Nothing Then | |
RaiseEvent PropertyChanged(Me, e) | |
End If | |
' You don't have to write this: | |
Dim handlers = PropertyChangedEvent | |
If handlers IsNot Nothing Then | |
handlers(Me, e) | |
End If | |
' You don't have to write this either: | |
PropertyChangedEvent?(Me, e) | |
' Just write this: | |
RaiseEvent PropertyChanged(Me, e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment