DoWorkEventHandler Delegate
Represents the method that will handle the DoWork event. This class cannot be inherited.
Assembly: System (in System.dll)
[HostProtectionAttribute(SecurityAction::LinkDemand, SharedState = true)] public delegate void DoWorkEventHandler( Object^ sender, DoWorkEventArgs^ e )
Parameters
- sender
-
Type:
System::Object^
The source of the event.
- e
-
Type:
System.ComponentModel::DoWorkEventArgs^
A DoWorkEventArgs that contains the event data.
When you create a DoWorkEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event-handler method is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see NIB: Events and Delegates.
The following code example demonstrates how to use the DoWorkEventHandler delegate to handle the DoWork event. For a full code listing, see How to: Run an Operation in the Background.
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0