Is It "Wrong"/Bad Design To Put A Thread/Background Worker In A Class?

Posted by Jetti on Programmers See other posts from Programmers or by Jetti
Published on 2011-02-03T22:27:45Z Indexed on 2011/02/03 23:34 UTC
Read the original article Hit count: 293

I have a class that will read from Excel (C# and .Net 4) and in that class I have a background worker that will load the data from Excel while the UI can remain responsive. My question is as follows: Is it bad design to have a background worker in a class? Should I create my class without it and use a background worker to operate on that class? I can't see any issues really of creating my class this way but then again I am a newbie so I figured I would make sure before I continue on.

I hope that this question is relevant here as I don't think it should be on stackoverflow as my code works, this just a design issue.

© Programmers or respective owner

Related posts about c#

Related posts about design