[Mono-list] 2 TODOs completed

Mr. Deepak P N Mr. Deepak P N" <deepakparasam@rediffmail.com
16 Mar 2004 08:56:27 -0000


 This is a multipart mime message


--Next_1079427387---0-203.199.83.28-12988
Content-type: multipart/alternative;
	boundary="Next_1079427387---1-203.199.83.28-12988"

 This is a multipart mime message


--Next_1079427387---1-203.199.83.28-12988
Content-type: text/html;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<P>=0AHi,<BR>=0A&nbsp; &nbsp;  I have implemented the Change() method[ fals=
e return value ) and the Dispose() method, which was incomplete.<BR>=0A<BR>=
=0APlease inform me whether this is fine or it needs any other modification=
.<BR>=0A<BR>=0AI will be interested to complete all the TODOs in the =93Sys=
tem.Threading=94 namespace.<BR>=0A<BR>=0AP.S: Timer.cs<BR>=0A<BR>=0ARegards=
,<BR>=0ADeepak.<BR>=0A=0A</P>=0A<br><br>=0A<A target=3D"_blank" HREF=3D"htt=
p://clients.rediff.com/signature/track_sig.asp"><IMG SRC=3D"http://ads.redi=
ff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail.com/inbox.htm@Bottom" B=
ORDER=3D0 VSPACE=3D0 HSPACE=3D0 HEIGHT=3D74 WIDTH=3D496></a>=0A
--Next_1079427387---1-203.199.83.28-12988
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,=0A     I have implemented the Change() method[ false return value ) and=
 the Dispose() method, which was incomplete.=0A=0APlease inform me whether =
this is fine or it needs any other modification.=0A=0AI will be interested =
to complete all the TODOs in the =93System.Threading=94 namespace.=0A=0AP.S=
: Timer.cs=0A=0ARegards,=0ADeepak.=0A
--Next_1079427387---1-203.199.83.28-12988--
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="Timer.cs"

Ly8KLy8gU3lzdGVtLlRocmVhZGluZy5UaW1lci5jcwovLwovLyBBdXRob3JzOgovLyAJRGlj
ayBQb3J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WZ5
T2JqZWN0OwoJCQkJYWUuU2V0KCk7CgkJCX0NCgkJCWVsc2UgaWYgKCBub3RpZnlPYmplY3Qg
aXMgTWFudWFsUmVzZXRFdmVudCApDQoJCQl7CgkJCQlNYW51YWxSZXNldEV2ZW50IG1lID0g
KCBNYW51YWxSZXNldEV2ZW50ICkgbm90aWZ5T2JqZWN0OwoJCQkJbWUuU2V0KCk7CgkJCX0N
CgkJCWVsc2UgaWYgKCBub3RpZnlPYmplY3QgaXMgTXV0ZXggKQ0KCQkJewoJCQkJTXV0ZXgg
bXV0ZXhFdmVudCA9ICggTXV0ZXggKSBub3RpZnlPYmplY3Q7CgkJCQltdXRleEV2ZW50LlJl
bGVhc2VNdXRleCgpOyAvL0ZJWE1FCgkJCX0KCQkJcmV0dXJuIHRydWU7CgkJfQoKCQl+VGlt
ZXIgKCkKCQl7CgkJCXJ1bm5lciA9IG51bGw7CgkJfQoJfQp9Cgo=

--Next_1079427387---0-203.199.83.28-12988
Content-type: text/plain;
	charset=iso-8859-1
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
	filename="Timer.cs"

Ly8KLy8gU3lzdGVtLlRocmVhZGluZy5UaW1lci5jcwovLwovLyBBdXRob3JzOgovLyAJRGlj
ayBQb3J0ZXIgKGRpY2tAeGltaWFuLmNvbSkKLy8gCUdvbnphbG8gUGFuaWFndWEgSmF2aWVy
IChnb256YWxvQHhpbWlhbi5jb20pCi8vCi8vIChDKSAyMDAxLCAyMDAyIFhpbWlhbiwgSW5j
LiAgaHR0cDovL3d3dy54aW1pYW4uY29tCi8vCgoKdXNpbmcgU3lzdGVtLkNvbGxlY3Rpb25z
OwpuYW1lc3BhY2UgU3lzdGVtLlRocmVhZGluZwp7CglwdWJsaWMgc2VhbGVkIGNsYXNzIFRp
bWVyIDogTWFyc2hhbEJ5UmVmT2JqZWN0LCBJRGlzcG9zYWJsZQoJewoJCS8vIEEgU3RhdGlj
IEFycmF5TGlzdCB3aGljaCBob2xkcyBhbGwgcmVmZ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