EventHandlerExtensionsRaiseEventT(EventHandlerT, Object, T) Method
Raises the event of the source EventHandler.
Namespace: DevCase.Extensions.EventHandlerExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static void RaiseEvent<T>(
this EventHandler<T> handler,
Object sender,
T e
)
where T : EventArgs
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Sub RaiseEvent(Of T As EventArgs) (
handler As EventHandler(Of T),
sender As Object,
e As T
)
Dim handler As EventHandler(Of T)
Dim sender As Object
Dim e As T
handler.RaiseEvent(sender, e)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
where T : EventArgs
static void RaiseEvent(
EventHandler<T>^ handler,
Object^ sender,
T e
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member RaiseEvent :
handler : EventHandler<'T> *
sender : Object *
e : 'T -> unit when 'T : EventArgs
No code example is currently available or this language may not be supported.
- handler EventHandlerT
-
The source EventHandler.
- sender Object
-
The source of the event.
- e T
-
The event information.
- T
-
The type of the event arguments.
In Visual Basic and C#, you can call this method as an instance method on any object of type
EventHandlerT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Dim handler As New EventHandler(Of FormClosingEventArgs)(AddressOf Me.Form1_FormClosing)
handler.RaiseEvent(Me, New FormClosingEventArgs(CloseReason.UserClosing, cancel:=True))
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
MsgBox("FormClosing event raised.")
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.