I\'m wondering if this construction will cause an error:
lock(sync) { // something lock(sync) { //something lock(sync) { //something
According to MSDN (see here and here) this is well-defined behaviour and causes no problem.