المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Bad design?



C# Programming
11-08-2012, 11:21 PM
void SomeFunction(){backgroundworker bw = new backgroundworker; bw.DoWork += (object, eventargs) =>{// time consuming work}; }
So what I'm asking is instead of having a separate method for DoWork, is it bad style to put it in the same method that the UI would call?