Application.Lock()/UnLock() or lock(Application)



Hello

Is there a difference between:

1.
Application.Lock();
try {
//...code
}
finally {
Application.UnLock();
}

pattern and
2.
lock(Application) {
//...code
}

?

I read on MSDN (http://support.microsoft.com/default.aspx/kb/271787)
that there are some situations when the first pattern blocks the
service.

Thanks.

.


Loading