snipt

Ctrl+h for KB shortcuts

C#

Ignore Cross-thread InvalidOperationException when Debugging

Control.CheckForIllegalCrossThreadCalls = false;
https://snipt.net/embed/fba3e1dde9bfdf41b17ca0bc914dbdb2/
/raw/fba3e1dde9bfdf41b17ca0bc914dbdb2/
fba3e1dde9bfdf41b17ca0bc914dbdb2
csharp
C#
1
2019-06-14T11:57:13
True
False
False
/api/public/snipt/38782/
ignore-cross-thread-invalidoperationexception-when-debugging
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">Control</span><span class="p">.</span><span class="n">CheckForIllegalCrossThreadCalls</span> <span class="p">=</span> <span class="k">false</span><span class="p">;</span> </span></pre></div> </td></tr></table>
BackgroundWorker, Thread