Computing.Net > Forums > Programming > Read/write file at same time? (C#)

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Read/write file at same time? (C#)

Reply to Message Icon

Name: Leo the 28C (by Sulfurik)
Date: June 29, 2005 at 19:44:45 Pacific
OS: Windows XP SP2
CPU/Ram: 1.4 GHz/480 MB
Comment:

Hello everyone! :D
OK, this is frustrating me... How do I open a file for reading and writing at the same time? I've tried having a StreamReader and a StreamWriter at the same time, but that raises some exceptions... I also tried doing a FileStream Stream and it didn't work... How do I do this? Thanks! ;)

http://www.boredsource.com/sulfurik/
http://tsfc.ath.cx
ftp://tsfc.ath.cx
hotline://tsfc.ath.cx

Giving out blank CD's in my FTP server! :D



Sponsored Link
Ads by Google

Response Number 1
Name: wizard-fred
Date: June 30, 2005 at 00:16:10 Pacific
Reply:

What you need is the equivalent of BASIC's binary or random access mode. I don't think you can use a stream mode, you need a block mode with a fixed record length.


0

Response Number 2
Name: Leo the 28C (by Sulfurik)
Date: June 30, 2005 at 16:16:53 Pacific
Reply:

Huh? O_O
Well, that sounds complicated... I'll just have to switch between StreamReader and Writer... But thanks! ;)

http://www.boredsource.com/sulfurik/
http://tsfc.ath.cx
ftp://tsfc.ath.cx
hotline://tsfc.ath.cx

Ruffle Mayo says ROFLMAO! :D


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Read/write file at same time? (C#)

How To Read/Write File in VB6 www.computing.net/answers/programming/how-to-readwrite-file-in-vb6/7105.html

Writing file w/ attributes in C++ www.computing.net/answers/programming/writing-file-w-attributes-in-c-/10113.html

read file from subroutine in c++ www.computing.net/answers/programming/read-file-from-subroutine-in-c/3714.html