🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: try catch question

#625
From: Rudy Velthuis [TeamB]
Date: Sun, 18 Jul 2004 18:16
28 lines
2481 bytes
At 20:07:56, 18.07.2004, Rudy Velthuis [TeamB] wrote:

> At 19:45:53, 18.07.2004, Lord Crc wrote:
> 
> > On Sun, 18 Jul 2004 19:05:03 +0200, "Rudy Velthuis [TeamB]"
> > <velthuis@gmail.com> wrote:
> > 
> > > We discussed this before. Using calls IDispose.Dispose(), and not
> > > Close(). 
> > 
> > And in the code in question, it was used StreamWriter, which says that
> > Close calls Dispose, so no difference, and leads to much cleaner code.
> 
> Like I said: I would never rely on internal details like that.
> 
> Fact is that Close() and IDispose.Dispose() are different routines, so
> I don't treat one like the other, even if - in the current
> implementation - both do exactly the same (call "self.Dispose(true);"),
> and even if one can guess that so many people will rely on this, that
> changing it would break their code.

BTW, I wonder who coded that. Both TextWriter.Close() and overriding
StreamWriter.Close() do the same. Why the override at all?
-- 
Rudy Velthuis [TeamB]

"I am not young enough to know everything."
    - Oscar Wilde (1854-1900)
Technical Details
Message-ID: <xn0dkxbswickuo01g-moderator@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!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> <jidlf0dsfagg66rgfr6g8534agbifad5p1@4ax.com> <xn0dkxbloi27bm01b-moderator@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> <jidlf0dsfagg66rgfr6g8534agbifad5p1@4ax.com> <xn0dkxbloi27bm01b-moderator@newsgroups.borland.com>
Organization: TeamB
User-Agent: XanaNews/1.16.3.1
Date: Sun, 18 Jul 2004 20:16:00 +0200
Message-ID: <xn0dkxbswickuo01g-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:00003F8A
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 80.135.216.214
X-Trace: newsgroups.borland.com 1090174273 80.135.216.214 (18 Jul 2004 11:11:13 -0700)
Lines: 28
X-Authenticated-User: rvelthuis
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail