Does exit or return in middle of synclock release synclock

If I execute an method exit or return in middle of synclock start/end block, will it release the synclock?  Or does the code have to execute the synclock end?
LVL 2
codequestAsked:
Who is Participating?
 
AlexFMCommented:
From MSDN:
The SyncLock block guarantees release of the lock, no matter how you exit the block.

So, the answer is: yes, lockobject is released.
0
 
codequestAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.