🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: 'File in use' error after File.Create() -- Thank you!

#672
From: Marc Rohloff TeamB
Date: Sat, 25 Sep 2004 01:18
13 lines
1321 bytes
On Thu, 23 Sep 2004 22:50:56 -0700, John Fowler wrote:

> How, then, can I keep 'fs' open and write to it? Or would it be easier 
> in code just to close and reopen it?

using (fs = File.Create("SomeFile3.txt"))
{
  Write to File Stream
}

-- 
Marc Rohloff [TeamB]
marc rohloff at myrealbox dot com
Technical Details
Message-ID: <g8bbgiz84whr.dlg@marcrohloff.40tude.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4152442d$1@newsgroups.borland.com> <415253dc$1@newsgroups.borland.com> <8pqa860s7xbv.dlg@marcrohloff.40tude.net> <4153b5ba$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,371711e74f47af5a
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: 'File in use' error after File.Create() -- Thank you!
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.13.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <4152442d$1@newsgroups.borland.com> <415253dc$1@newsgroups.borland.com> <8pqa860s7xbv.dlg@marcrohloff.40tude.net> <4153b5ba$1@newsgroups.borland.com>
Date: Fri, 24 Sep 2004 21:18:36 -0400
Message-ID: <g8bbgiz84whr.dlg@marcrohloff.40tude.net>
NNTP-Posting-Host: 4.225.98.8
X-Trace: newsgroups.borland.com 1096075022 4.225.98.8 (24 Sep 2004 18:17:02 -0700)
Lines: 13
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail