Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4113882
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:23:00+00:00 2026-05-20T22:23:00+00:00

I have an assembly (.NET class library) that contains an object that implements EAP

  • 0

I have an assembly (.NET class library) that contains an object that implements EAP for asynchronous methods:

class Product
{
    void Install();
    void InstallAsync();
    EventHandler<InstallProgressChangedEventArgs> Installing;
    EventHandler<InstallCompletedEventArgs> Installed;
}

I am contemplating whether to use “standard” Thread or use the BackgroundWorker class provided by .NET.

I’ve read that one should only use BackgroundWorker when it is expected that the object will be used in “Windows Forms” or UI. The class library I’m writing can be used on Windows Form, WPF Application and Console application.

Also, if I am to use the BackgroundWorker class, is it “proper” to not subclass from the BackgroundWorker class? I don’t want to expose the class’ members as I will be providing my own events (Installing and Installed).

If the BackgroundWorker class is not appropriate, what can you recommend and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:23:01+00:00Added an answer on May 20, 2026 at 10:23 pm

    There’s no problems using the BW component outside of Windows forms UI applications. It’s meant to be used where you just need to easily fire off a background thread and receive the callback when that work is complete.

    If your only requirement is that you want to start up a thread to do work, and get results back, and you don’t need the control you get by managing the thread yourself, I would recommend you use it.

    I wouldn’t subclass it though, unless you want your component to BE a background worker itself. That is, you’re extending its behaviors. If you’re simply using its behaviors there’s no need to subclass, just use composition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I have a .NET assembly that contains classes to be registered as ServicedComponent through
I have a dll that contains a dot net assembly - common intermediate language.
I have to use a class/assembly made in C# .NET from native C++ application.
I have a .net assembly that has a COM+ ServicedCopmonent in it and at
I have an assembly that is targeted for .NET 3.5. I have an application
I have a non-.Net executable file that is included in my .net assembly as
I have a Delphi 5 executable that calls into a .NET assembly via the
I have a third party .NET Assembly and a large Java application. I need
I have an assembly. Is there a way to detect which version of .NET

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.