Just heard word that the Orcas release of Visual Studio Code Analysis (and
FxCop, I'm assuming) will contain a check for lock(this) and SyncLock Me.
So, documentation and sample code should have lock(this) removed around
the RTM for Orcas, I hope.  So, people should learn pretty quickly after
that...

On Fri, 11 Aug 2006 11:43:56 -0400, =?ISO-8859-1?Q?S=E9bastien_Lorion?=
<[EMAIL PROTECTED]> wrote:

>Even the lock code snippet in VS 2005 suggests "this" as a default
>value. How do they expect people to learn ?
>
>Btw, locking on a string is not a good idea either because since
>strings are immutable, they can be shared/interned, thus they may be
>publicly accessible too.
>
>Sébastien

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to