This is a multi-part message in MIME format.
------=_NextPart_000_0018_01C76B09.FEF27A10
Content-Type: text/plain;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
I was often noted by Thread Safety declarations when I was reading .NET =
Framework Class Library documents in MSDN.=20
The declaration is usually described as 'Any public static (Shared in =
Visual Basic) members of this type are thread safe. Any instance members =
are not guaranteed to be thread safe.' =20
So, does this mean All the static/shared methods written in .NET =
compatible programming language, such as C#, VB.NET, are guaranteed to =
be synchronized and thread safe? Or else, we still need to implement our =
custom code to ensure the thread-safty for static methods?
------=_NextPart_000_0018_01C76B09.FEF27A10
Content-Type: text/html;
charset="gb2312"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dgb2312">
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I was often noted by <STRONG>Thread =
Safety</STRONG>=20
declarations when I was reading <STRONG>.NET Framework Class =
Library</STRONG>=20
documents in MSDN. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The declaration is usually =
described as=20
'Any <EM>public static (Shared in Visual Basic) members of this type are =
thread=20
safe. Any instance members are not guaranteed to be thread =
safe.</EM>' =20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>So, does this mean <STRONG>All</STRONG> =
the=20
static/shared methods written in .NET compatible programming language, =
such as=20
C#, VB.NET, are guaranteed to be synchronized and thread safe? =
Or=20
else, we still need to implement our custom code to ensure the =
thread-safty for=20
static methods?</FONT></DIV></BODY></HTML>
------=_NextPart_000_0018_01C76B09.FEF27A10--