Return in a lock statement
suggest changeFollowing code will release lock.
lock(locker)
{
return 5;
}
For a detailed explanation, this SO answer is recommended.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents