I have a function LoadData with huge number of WinForm controls and it loads data from database in to the control.
Now it’s become very slow, should i use threading, if yes then pls suggest a good sample, I already tried the MSDN sample
But it’s not useful to me, it’ll required lot of change in my code.
I assume you have a lot of code that interacts with UI and you want to do from background thread.
You could add a method like this:
The usage:
Old
New
Or extension method, to make usages shorter
Usage: