🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #631

Re: try catch question

#631
From: Rudy Velthuis [TeamB]
Date: Mon, 19 Jul 2004 10:57
23 lines
2316 bytes
At 22:30:10, 18.07.2004, Joe Mayo wrote:

> > We discussed this before. Using calls IDispose.Dispose(), and not
> > Close(). Technically there may be no big difference, but semantically,
> > there is. I personally would not rely on the fact that both would do
> > exactly the same, since both (or a descendant class) don't have to do
> > exactly the same.
> 
> Sure, Close and Dispose are two different methods, but in the .NET
> Framework, Close methods call the Dispose method.

Not exactly. IDispose.Dispose() for StreamWriter calls
StreamWriter.Dispose with true parameter. So does Close().

So, we *know* that because it is documented and because we can see the
source. But that is an implementation detail. I personally would never
rely on such a detail. IOW, I simply wouldn't make an exception for
StreamWriter.Close().
-- 
Rudy Velthuis [TeamB]

"Few things are harder to put up with than a good example."
    - Mark Twain (1835-1910)
Technical Details
Message-ID: <xn0dkyerh1bs6700c-moderator@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <40f3748e@newsgroups.borland.com> <40F380DB.819CE161@midnightbeach.com> <40f934bb$1@newsgroups.borland.com> <s3am1jplg0p9$.dlg@marcrohloff.40tude.net> <is0jf0l76g610ajlns5154ij25vantsvp6@4ax.com> <xn0dkx9y9ftcjf013-moderator@newsgroups.borland.com> <40faddbc$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,f80ee75cfac101b9
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Rudy Velthuis [TeamB]" <velthuis@gmail.com>
Subject: Re: try catch question
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <40f3748e@newsgroups.borland.com> <40F380DB.819CE161@midnightbeach.com> <40f934bb$1@newsgroups.borland.com> <s3am1jplg0p9$.dlg@marcrohloff.40tude.net> <is0jf0l76g610ajlns5154ij25vantsvp6@4ax.com> <xn0dkx9y9ftcjf013-moderator@newsgroups.borland.com> <40faddbc$1@newsgroups.borland.com>
Organization: TeamB
User-Agent: XanaNews/1.16.3.1
Date: Mon, 19 Jul 2004 12:57:58 +0200
Message-ID: <xn0dkyerh1bs6700c-moderator@newsgroups.borland.com>
X-Realname: Rudy Velthuis (TeamB)
X-Face: ":yn4zt^A_dn>6~{YJmu^B\'4w)e:apPM\VC=Dvf&*tASxX9|BYczkFd$xr.$vNSZ[3Uobr
 p]c4\+\l){!WQI.$]veP({HLd;CDYH?iN
X-Ref: newsgroups.borland.com ~XNS:00003FA5
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.93.139.248
X-Trace: newsgroups.borland.com 1090234392 217.93.139.248 (19 Jul 2004 03:53:12 -0700)
Lines: 23
X-Authenticated-User: rvelthuis
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx02.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail