A question about lock() and exceptions

  • Thread starter Thread starter Paul Tomlinson
  • Start date Start date
P

Paul Tomlinson

All,
If I do something like this:

lock( typeof( mainform ) )
{
....
if( some condition ) throw new Exception()
....
}

when "some condition" is true and the exception gets thrown does the lock
get released?

Thanks
PT
 
yes

--
HTH

Ollie Riches
http://www.phoneanalyser.net

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a programmer
helping programmers.
 
Back
Top