Can I use not sealed classes in the background task?


  • Could you please advise how to declare any not sealed classes or any namespace with not sealed classes only for internal using?

    I need to create a hierarchy of the classes in the background task.

    For example, class Task1 inherits from class BaseTask,  and class Task2 inherits from the class BaseTask.

    But C# background task needs only sealed classes and I cannot create any base class for inheritance.

    Thursday, March 6, 2014 7:16 PM


  • Hi,

    Please refer to the link:


    In the link, there have a note linke below:

    Note  The background task class itself - and all other classes in the background task project - need to be public classes that are sealed.

    I think this is by design.

    Best Wishes!

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by _dima Saturday, March 8, 2014 12:23 AM
    Friday, March 7, 2014 2:38 AM