Replies: 1 comment
-
This is a common mistake. Incorrect code line: Please refer to the following article: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
When simple test code is executed in .NET Framework 4.8 project of type Class Library or Console - it works. When it's executed in Windows Form (e.g. in button click) - it doesn't, even if button is calling the DLL that is actually executing the code.
Your code piece
Consider this code:
Result
It returns "4" if your project type is Console and you are executing it in console. When it's executed from Form - the call is never returned, it will wait forever.
Expected behavior
I expected the code to work, or at least return an error explaining what's wrong.
I assume there is a simple explanation to this behaviour that I am missing, but perhaps DLL can handle it?
Beta Was this translation helpful? Give feedback.
All reactions