Re: StreamReader.close and StreamWriter.close
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sun, 18 Feb 2007 07:57:35 -0000
<Eran.Yasso@xxxxxxxxx> wrote:
In the MSDN the sample doesn't use the close() method. But I know that
in most languages you do need to use the close() method after reading
and writing to a file.
<snip>
does the "Using" replaces the needing for Close() method?
Yes. "using" is equivalent to a try/finally block which calls Dispose()
in the finally block.
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: StreamReader.close and StreamWriter.close
- From: Laurent Bugnion [MVP]
- Re: StreamReader.close and StreamWriter.close
- References:
- StreamReader.close and StreamWriter.close
- From: Eran . Yasso
- StreamReader.close and StreamWriter.close
- Prev by Date: Re: Is there a class like java.util.Properties?
- Next by Date: Re: minor reflection loadfrom/loadfile quirk
- Previous by thread: StreamReader.close and StreamWriter.close
- Next by thread: Re: StreamReader.close and StreamWriter.close
- Index(es):
Relevant Pages
|