المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : raising considiton



C# Programming
03-16-2010, 04:51 PM
hello.

I'm trying to find a way, how to detect raising condition error.
Just for example :

int a = 0;
thread1 -> a = 1;
thread2 -> a = 2;

so, the answer is using lock. but if I forgot to use lock,
how to detect this error ?
Or the application just disappear without any error message ?

Thanks.