0

Newbie C# programmer here, but extensive procedural programming experience...

Yes, I have read the Microsoft documentation on threads. :)

It is silent on this question...

Why does my method, lets call it Populate() get called from the Main thread sometimes and other times after clicking the exact same button, gets called from a Worker thread?

Visual Studio 2017, Threads window, Debugger.

deputylactose
  • 21
  • 1
  • 4
  • Other threads will not be involved unless you involve them. So apparently you do. – GSerg Oct 05 '19 at 16:07
  • The question wasn't whether or not I have a multiple thread program, of course I do because I already mentioned that I'm using the "Threads" window of VS while debugging the program. My question was why does the button "behind code" fire from the UI thread sometimes and other times the button click processing code fires off a worker thread? – deputylactose Oct 06 '19 at 20:47
  • Like I said, this does not happen randomly. If it happens to you, that's because you did something wrong. We would need to [see the code](https://stackoverflow.com/help/minimal-reproducible-example) to tell what. – GSerg Oct 07 '19 at 06:33

0 Answers0