views:

58

answers:

1

I'm using C# and I'm making an application where a lot of UI loading must be done in background. Is it possible to do it unsafely and ignore InvalidOperationExceptions? The only way I found it to put try...catch statements around every single line of code but this will take ages as there is too much code.

+2  A: 

Updating UI directly from threads is a bad thing. If you have multiple threads trying to update, then you are in trouble, If you are sure that only that thread is going to update the UI,

use this before invoking the thread

CheckForIllegalCrossThreadCalls =False
Sr7
that's what I needed
Nick Brooks
@Srin at least you warned him... :)
Lirik