Creating a new BackgroundWorker instance C# with Example



Creating a new BackgroundWorker instance C# with Example

A BackgroundWorker is commonly used to perform tasks, sometimes time consuming, without blocking the UI 
thread. 
// BackgroundWorker is part of the ComponentModel namespace. 
using System.ComponentModel; 
namespace BGWorkerExample 
{ 
public partial class ExampleForm : Form 
{ 
// the following creates an instance of the BackgroundWorker named "bgWorker" 
BackgroundWorker bgWorker = new BackgroundWorker(); 
public ExampleForm() { ... 

0 Comment's

Comment Form

Submit Comment